# Realtime Kit # Apps ## Fetch all apps `client.realtimeKit.apps.get(AppGetParamsparams, RequestOptionsoptions?): AppGetResponse` **get** `/accounts/{account_id}/realtime/kit/apps` Fetch all apps for your account ### Parameters - `params: AppGetParams` - `account_id: string` The account identifier tag. ### Returns - `AppGetResponse` - `data?: Array` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.realtimeKit.apps.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' }); console.log(app.data); ``` #### Response ```json { "data": [ { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-first-app" } ], "success": true } ``` ## Create App `client.realtimeKit.apps.post(AppPostParamsparams, RequestOptionsoptions?): AppPostResponse` **post** `/accounts/{account_id}/realtime/kit/apps` Create new app for your account ### Parameters - `params: AppPostParams` - `account_id: string` Path param - `name: string` Body param ### Returns - `AppPostResponse` - `data?: Data` - `app?: App` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.apps.post({ account_id: 'account_id', name: 'name' }); console.log(response.data); ``` #### Response ```json { "data": { "app": { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-new-app" } }, "success": true } ``` ## Domain Types ### App Get Response - `AppGetResponse` - `data?: Array` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean` ### App Post Response - `AppPostResponse` - `data?: Data` - `app?: App` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean` # Meetings ## Fetch all meetings for an App `client.realtimeKit.meetings.get(stringappId, MeetingGetParamsparams, RequestOptionsoptions?): MeetingGetResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Returns all meetings for the given App ID. ### Parameters - `appId: string` The app identifier tag. - `params: MeetingGetParams` - `account_id: string` Path param: The account identifier tag. - `end_time?: string` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: The search query string. You can search using the meeting ID or title. - `start_time?: string` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. ### Returns - `MeetingGetResponse` - `data: Array` - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const meeting = await client.realtimeKit.meetings.get('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(meeting.data); ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a meeting `client.realtimeKit.meetings.create(stringappId, MeetingCreateParamsparams, RequestOptionsoptions?): MeetingCreateResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Create a meeting for the given App ID. ### Parameters - `appId: string` The app identifier tag. - `params: MeetingCreateParams` - `account_id: string` Path param: The account identifier tag. - `ai_config?: AIConfig` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean | null` Body param: Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Body param: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start?: boolean | null` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Body param: Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `summarize_on_end?: boolean` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string | null` Body param: Title of the meeting ### Returns - `MeetingCreateResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const meeting = await client.realtimeKit.meetings.create('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(meeting.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch a meeting for an App `client.realtimeKit.meetings.getMeetingById(stringappId, stringmeetingId, MeetingGetMeetingByIDParamsparams, RequestOptionsoptions?): MeetingGetMeetingByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Returns a meeting details in an App for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: MeetingGetMeetingByIDParams` - `account_id: string` Path param: The account identifier tag. - `name?: string` Query param ### Returns - `MeetingGetMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.getMeetingById( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Update a meeting `client.realtimeKit.meetings.updateMeetingById(stringappId, stringmeetingId, MeetingUpdateMeetingByIDParamsparams, RequestOptionsoptions?): MeetingUpdateMeetingByIDResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Updates a meeting in an App for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: MeetingUpdateMeetingByIDParams` - `account_id: string` Path param: The account identifier tag. - `ai_config?: AIConfig` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Body param: Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Body param: If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start?: boolean` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs?: number` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Body param: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Body param: Title of the meeting ### Returns - `MeetingUpdateMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.updateMeetingById( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Replace a meeting `client.realtimeKit.meetings.replaceMeetingById(stringappId, stringmeetingId, MeetingReplaceMeetingByIDParamsparams, RequestOptionsoptions?): MeetingReplaceMeetingByIDResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Replaces all the details for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: MeetingReplaceMeetingByIDParams` - `account_id: string` Path param: The account identifier tag. - `ai_config?: AIConfig` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean | null` Body param: Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Body param: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start?: boolean | null` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Body param: Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `summarize_on_end?: boolean` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string | null` Body param: Title of the meeting ### Returns - `MeetingReplaceMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.replaceMeetingById( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch all participants of a meeting `client.realtimeKit.meetings.getMeetingParticipants(stringappId, stringmeetingId, MeetingGetMeetingParticipantsParamsparams, RequestOptionsoptions?): MeetingGetMeetingParticipantsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Returns all participants detail for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: MeetingGetMeetingParticipantsParams` - `account_id: string` Path param: The account identifier tag. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page ### Returns - `MeetingGetMeetingParticipantsResponse` - `data: Array` - `id: string` ID of the participant. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.getMeetingParticipants( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Add a participant `client.realtimeKit.meetings.addParticipant(stringappId, stringmeetingId, MeetingAddParticipantParamsparams, RequestOptionsoptions?): MeetingAddParticipantResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Adds a participant to the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: MeetingAddParticipantParams` - `account_id: string` Path param: The account identifier tag. - `custom_participant_id: string` Body param: A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. - `preset_name: string` Body param: Name of the preset to apply to this participant. - `name?: string | null` Body param: (Optional) Name of the participant. - `picture?: string | null` Body param: (Optional) A URL to a picture to be used for the participant. ### Returns - `MeetingAddParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Represents a participant. - `id: string` ID of the participant. - `token: string` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.addParticipant( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', custom_participant_id: 'custom_participant_id', preset_name: 'preset_name', }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Fetch a participant's detail `client.realtimeKit.meetings.getMeetingParticipant(stringappId, stringmeetingId, stringparticipantId, MeetingGetMeetingParticipantParamsparams, RequestOptionsoptions?): MeetingGetMeetingParticipantResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Returns a participant details for the given meeting and participant ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `participantId: string` - `params: MeetingGetMeetingParticipantParams` - `account_id: string` The account identifier tag. ### Returns - `MeetingGetMeetingParticipantResponse` - `data: Data` Data returned by the operation - `id: string` ID of the participant. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.getMeetingParticipant( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" }, "success": true } ``` ## Edit a participant's detail `client.realtimeKit.meetings.editParticipant(stringappId, stringmeetingId, stringparticipantId, MeetingEditParticipantParamsparams, RequestOptionsoptions?): MeetingEditParticipantResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Updates a participant's details for the given meeting and participant ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `participantId: string` - `params: MeetingEditParticipantParams` - `account_id: string` Path param: The account identifier tag. - `name?: string | null` Body param: (Optional) Name of the participant. - `picture?: string | null` Body param: (Optional) A URL to a picture to be used for the participant. - `preset_name?: string | null` Body param: (Optional) Name of the preset to apply to this participant. ### Returns - `MeetingEditParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Represents a participant. - `id: string` ID of the participant. - `token: string` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.editParticipant( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Delete a participant `client.realtimeKit.meetings.deleteMeetingParticipant(stringappId, stringmeetingId, stringparticipantId, MeetingDeleteMeetingParticipantParamsparams, RequestOptionsoptions?): MeetingDeleteMeetingParticipantResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Deletes a participant for the given meeting and participant ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `participantId: string` - `params: MeetingDeleteMeetingParticipantParams` - `account_id: string` The account identifier tag. ### Returns - `MeetingDeleteMeetingParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `created_at: string` Timestamp this object was created at. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_id: string` ID of the preset applied to this participant. - `updated_at: string` Timestamp this object was updated at. The time is returned in ISO format. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.deleteMeetingParticipant( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Refresh participant's authentication token `client.realtimeKit.meetings.refreshParticipantToken(stringappId, stringmeetingId, stringparticipantId, MeetingRefreshParticipantTokenParamsparams, RequestOptionsoptions?): MeetingRefreshParticipantTokenResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token` Regenerates participant's authentication token for the given meeting and participant ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `participantId: string` - `params: MeetingRefreshParticipantTokenParams` - `account_id: string` The account identifier tag. ### Returns - `MeetingRefreshParticipantTokenResponse` - `data: Data` Data returned by the operation - `token: string` Regenerated participant's authentication token. - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.meetings.refreshParticipantToken( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "token": "token" }, "success": true } ``` ## Domain Types ### Meeting Get Response - `MeetingGetResponse` - `data: Array` - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Meeting Create Response - `MeetingCreateResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Meeting Get Meeting By ID Response - `MeetingGetMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Meeting Update Meeting By ID Response - `MeetingUpdateMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Meeting Replace Meeting By ID Response - `MeetingReplaceMeetingByIDResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config?: AIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization?: Summarization` Summary Config - `summary_type?: "general" | "team_meeting" | "sales_call" | 6 more` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format?: "plain_text" | "markdown"` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit?: number` Sets the maximum number of words in the meeting summary. - `transcription?: Transcription` Transcription Configurations - `keywords?: Array` Adds specific terms to improve accurate detection during transcription. - `language?: "en-US" | "en-IN" | "de" | 7 more` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter?: boolean` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config?: RecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config?: AudioConfig` Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config?: LiveStreamingConfig` - `rtmp_url?: string` RTMP URL to stream to - `max_seconds?: number` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config?: RealtimekitBucketConfig` - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `video_config?: VideoConfig` - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. ### Meeting Get Meeting Participants Response - `MeetingGetMeetingParticipantsResponse` - `data: Array` - `id: string` ID of the participant. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Meeting Add Participant Response - `MeetingAddParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Represents a participant. - `id: string` ID of the participant. - `token: string` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. ### Meeting Get Meeting Participant Response - `MeetingGetMeetingParticipantResponse` - `data: Data` Data returned by the operation - `id: string` ID of the participant. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. - `success: boolean` Success status of the operation ### Meeting Edit Participant Response - `MeetingEditParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Represents a participant. - `id: string` ID of the participant. - `token: string` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: string` When this object was created. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_name: string` Preset applied to the participant. - `updated_at: string` When this object was updated. The time is returned in ISO format. - `name?: string | null` Name of the participant. - `picture?: string | null` URL to a picture of the participant. ### Meeting Delete Meeting Participant Response - `MeetingDeleteMeetingParticipantResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `created_at: string` Timestamp this object was created at. The time is returned in ISO format. - `custom_participant_id: string` A unique participant ID generated by the client. - `preset_id: string` ID of the preset applied to this participant. - `updated_at: string` Timestamp this object was updated at. The time is returned in ISO format. ### Meeting Refresh Participant Token Response - `MeetingRefreshParticipantTokenResponse` - `data: Data` Data returned by the operation - `token: string` Regenerated participant's authentication token. - `success: boolean` Success status of the operation # Presets ## Fetch all presets `client.realtimeKit.presets.get(stringappId, PresetGetParamsparams, RequestOptionsoptions?): PresetGetResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Fetches all the presets belonging to an App. ### Parameters - `appId: string` The app identifier tag. - `params: PresetGetParams` - `account_id: string` Path param: The account identifier tag. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page ### Returns - `PresetGetResponse` - `data: Array` - `id?: string` ID of the preset - `created_at?: string` Timestamp this preset was created at - `name?: string` Name of the preset - `updated_at?: string` Timestamp this preset was last updated - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const preset = await client.realtimeKit.presets.get('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(preset.data); ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a preset `client.realtimeKit.presets.create(stringappId, PresetCreateParamsparams, RequestOptionsoptions?): PresetCreateResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Creates a preset belonging to the current App ### Parameters - `appId: string` The app identifier tag. - `params: PresetCreateParams` - `account_id: string` Path param: The account identifier tag. - `config: Config` Body param - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Body param: Name of the preset - `ui: UI` Body param - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` Body param - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` ### Returns - `PresetCreateResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const preset = await client.realtimeKit.presets.create('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', config: { max_screenshare_count: 0, max_video_streams: { desktop: 0, mobile: 0 }, media: { screenshare: { frame_rate: 0, quality: 'hd' }, video: { frame_rate: 30, quality: 'hd' }, }, view_type: 'GROUP_CALL', }, name: 'name', ui: { design_tokens: { border_radius: 'rounded', border_width: 'thin', colors: { background: { '600': '600', '700': '700', '800': '800', '900': '900', '1000': '1000', }, brand: { '300': '300', '400': '400', '500': '500', '600': '600', '700': '700', }, danger: 'danger', success: 'success', text: 'text', text_on_brand: 'text_on_brand', video_bg: 'video_bg', warning: 'warning', }, logo: 'logo', spacing_base: 0, theme: 'dark', }, }, }); console.log(preset.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Fetch details of a preset `client.realtimeKit.presets.getPresetById(stringappId, stringpresetId, PresetGetPresetByIDParamsparams, RequestOptionsoptions?): PresetGetPresetByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Fetches details of a preset using the provided preset ID ### Parameters - `appId: string` The app identifier tag. - `presetId: string` - `params: PresetGetPresetByIDParams` - `account_id: string` The account identifier tag. ### Returns - `PresetGetPresetByIDResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.presets.getPresetById('app_id', 'preset_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Delete a preset `client.realtimeKit.presets.delete(stringappId, stringpresetId, PresetDeleteParamsparams, RequestOptionsoptions?): PresetDeleteResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Deletes a preset using the provided preset ID ### Parameters - `appId: string` The app identifier tag. - `presetId: string` - `params: PresetDeleteParams` - `account_id: string` The account identifier tag. ### Returns - `PresetDeleteResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const preset = await client.realtimeKit.presets.delete('app_id', 'preset_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(preset.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Update a preset `client.realtimeKit.presets.update(stringappId, stringpresetId, PresetUpdateParamsparams, RequestOptionsoptions?): PresetUpdateResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Update a preset by the provided preset ID ### Parameters - `appId: string` The app identifier tag. - `presetId: string` - `params: PresetUpdateParams` - `account_id: string` Path param: The account identifier tag. - `config?: Config` Body param - `max_screenshare_count?: number` Maximum number of screen shares that can be active at a given time - `max_video_streams?: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop?: number` Maximum number of video streams visible on desktop devices - `mobile?: number` Maximum number of streams visible on mobile devices - `media?: Media` Media configuration options. eg: Video quality - `screenshare?: Screenshare` Configuration options for participant screen shares - `frame_rate?: number` Frame rate of screen share - `quality?: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video?: Video` Configuration options for participant videos - `frame_rate?: number` Frame rate of participants' video - `quality?: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `view_type?: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name?: string` Body param: Name of the preset - `permissions?: Permissions` Body param - `accept_waiting_requests?: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests?: boolean` - `can_change_participant_permissions?: boolean` - `can_edit_display_name?: boolean` - `can_livestream?: boolean` - `can_record?: boolean` - `can_spotlight?: boolean` - `chat?: Chat` Chat permissions - `private?: Private` - `can_receive?: boolean` - `can_send?: boolean` - `files?: boolean` - `text?: boolean` - `public?: Public` - `can_send?: boolean` Can send messages in general - `files?: boolean` Can send file messages - `text?: boolean` Can send text messages - `connected_meetings?: ConnectedMeetings` - `can_alter_connected_meetings?: boolean` - `can_switch_connected_meetings?: boolean` - `can_switch_to_parent_meeting?: boolean` - `disable_participant_audio?: boolean` - `disable_participant_screensharing?: boolean` - `disable_participant_video?: boolean` - `hidden_participant?: boolean` Whether this participant is visible to others or not - `is_recorder?: boolean` - `kick_participant?: boolean` - `media?: Media` Media permissions - `audio?: Audio` Audio permissions - `can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare?: Screenshare` Screenshare permissions - `can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video?: Video` Video permissions - `can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant?: boolean` - `plugins?: Plugins` Plugin permissions - `can_close?: boolean` Can close plugins that are already open - `can_edit_config?: boolean` Can edit plugin config - `can_start?: boolean` Can start plugins - `config?: string | UnionMember1` - `string` - `UnionMember1` - `access_control?: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only?: boolean` - `polls?: Polls` Poll permissions - `can_create?: boolean` Can create polls - `can_view?: boolean` Can view polls - `can_vote?: boolean` Can vote on polls - `recorder_type?: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list?: boolean` - `waiting_room_type?: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `ui?: UI` Body param - `config_diff?: unknown` - `design_tokens?: DesignTokens` - `border_radius?: "rounded"` - `"rounded"` - `border_width?: "thin"` - `"thin"` - `colors?: Colors` - `background?: Background` - `"1000"?: string` - `"600"?: string` - `"700"?: string` - `"800"?: string` - `"900"?: string` - `brand?: Brand` - `"300"?: string` - `"400"?: string` - `"500"?: string` - `"600"?: string` - `"700"?: string` - `danger?: string` - `success?: string` - `text?: string` - `text_on_brand?: string` - `video_bg?: string` - `warning?: string` - `logo?: string` - `spacing_base?: number` - `theme?: "dark"` - `"dark"` ### Returns - `PresetUpdateResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const preset = await client.realtimeKit.presets.update('app_id', 'preset_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(preset.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Domain Types ### Preset Get Response - `PresetGetResponse` - `data: Array` - `id?: string` ID of the preset - `created_at?: string` Timestamp this preset was created at - `name?: string` Name of the preset - `updated_at?: string` Timestamp this preset was last updated - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Preset Create Response - `PresetCreateResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Preset Get Preset By ID Response - `PresetGetPresetByIDResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Preset Delete Response - `PresetDeleteResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation ### Preset Update Response - `PresetUpdateResponse` - `data: Data` Data returned by the operation - `id: string` ID of the preset - `config: Config` - `max_screenshare_count: number` Maximum number of screen shares that can be active at a given time - `max_video_streams: MaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: number` Maximum number of video streams visible on desktop devices - `mobile: number` Maximum number of streams visible on mobile devices - `media: Media` Media configuration options. eg: Video quality - `screenshare: Screenshare` Configuration options for participant screen shares - `frame_rate: number` Frame rate of screen share - `quality: "hd" | "vga" | "qvga"` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Video` Configuration options for participant videos - `frame_rate: number` Frame rate of participants' video - `quality: "hd" | "vga" | "qvga"` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio?: Audio` Control options for Audio quality. - `enable_high_bitrate?: boolean` Enable High Quality Audio for your meetings - `enable_stereo?: boolean` Enable Stereo for your meetings - `view_type: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: string` Name of the preset - `ui: UI` - `design_tokens: DesignTokens` - `border_radius: "rounded"` - `"rounded"` - `border_width: "thin"` - `"thin"` - `colors: Colors` - `background: Background` - `"1000": string` - `"600": string` - `"700": string` - `"800": string` - `"900": string` - `brand: Brand` - `"300": string` - `"400": string` - `"500": string` - `"600": string` - `"700": string` - `danger: string` - `success: string` - `text: string` - `text_on_brand: string` - `video_bg: string` - `warning: string` - `logo: string` - `spacing_base: number` - `theme: "dark"` - `"dark"` - `config_diff?: unknown` - `permissions?: Permissions` - `accept_waiting_requests: boolean` Whether this participant can accept waiting requests - `can_accept_production_requests: boolean` - `can_change_participant_permissions: boolean` - `can_edit_display_name: boolean` - `can_livestream: boolean` - `can_record: boolean` - `can_spotlight: boolean` - `chat: Chat` Chat permissions - `private: Private` - `can_receive: boolean` - `can_send: boolean` - `files: boolean` - `text: boolean` - `public: Public` - `can_send: boolean` Can send messages in general - `files: boolean` Can send file messages - `text: boolean` Can send text messages - `connected_meetings: ConnectedMeetings` - `can_alter_connected_meetings: boolean` - `can_switch_connected_meetings: boolean` - `can_switch_to_parent_meeting: boolean` - `disable_participant_audio: boolean` - `disable_participant_screensharing: boolean` - `disable_participant_video: boolean` - `hidden_participant: boolean` Whether this participant is visible to others or not - `kick_participant: boolean` - `media: Media` Media permissions - `audio: Audio` Audio permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Screenshare` Screenshare permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Video` Video permissions - `can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: boolean` - `plugins: Plugins` Plugin permissions - `can_close: boolean` Can close plugins that are already open - `can_edit_config: boolean` Can edit plugin config - `can_start: boolean` Can start plugins - `config: string | UnionMember1` - `string` - `UnionMember1` - `access_control: "FULL_ACCESS" | "VIEW_ONLY"` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: boolean` - `polls: Polls` Poll permissions - `can_create: boolean` Can create polls - `can_view: boolean` Can view polls - `can_vote: boolean` Can vote on polls - `recorder_type: "RECORDER" | "LIVESTREAMER" | "NONE"` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: boolean` - `waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder?: boolean` - `success: boolean` Success status of the operation # Sessions ## Fetch all sessions of an App `client.realtimeKit.sessions.getSessions(stringappId, SessionGetSessionsParamsparams, RequestOptionsoptions?): SessionGetSessionsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions` Returns details of all sessions of an App. ### Parameters - `appId: string` The app identifier tag. - `params: SessionGetSessionsParams` - `account_id: string` Path param: The account identifier tag. - `associated_id?: string` Query param: ID of the meeting that sessions should be associated with - `end_time?: string` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `participants?: string` Query param - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: Search string that matches sessions based on meeting title, meeting ID, and session ID - `sort_by?: "minutesConsumed" | "createdAt"` Query param - `"minutesConsumed"` - `"createdAt"` - `sort_order?: "ASC" | "DESC"` Query param - `"ASC"` - `"DESC"` - `start_time?: string` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `status?: "LIVE" | "ENDED"` Query param - `"LIVE"` - `"ENDED"` ### Returns - `SessionGetSessionsResponse` - `data?: Data` - `sessions?: Array` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessions('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessions": [ { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } ] }, "success": true } ``` ## Fetch details of a session `client.realtimeKit.sessions.getSessionDetails(stringappId, stringsessionId, SessionGetSessionDetailsParamsparams, RequestOptionsoptions?): SessionGetSessionDetailsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}` Returns data of the given session ID including recording details. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionDetailsParams` - `account_id: string` Path param: The account identifier tag. - `include_breakout_rooms?: boolean` Query param: List all breakout rooms ### Returns - `SessionGetSessionDetailsResponse` - `data?: Data` - `session?: Session` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionDetails('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "session": { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } }, "success": true } ``` ## Fetch participants list of a session `client.realtimeKit.sessions.getSessionParticipants(stringappId, stringsessionId, SessionGetSessionParticipantsParamsparams, RequestOptionsoptions?): SessionGetSessionParticipantsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants` Returns a list of participants for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionParticipantsParams` - `account_id: string` Path param: The account identifier tag. - `include_peer_events?: boolean` Query param: if true, response includes all the peer events of participants. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: The search query string. You can search using the meeting ID or title. - `sort_by?: "joinedAt" | "duration"` Query param - `"joinedAt"` - `"duration"` - `sort_order?: "ASC" | "DESC"` Query param - `"ASC"` - `"DESC"` - `view?: "raw" | "consolidated"` Query param: In breakout room sessions, the view parameter can be set to `raw` for session specific duration for participants or `consolidated` to accumulate breakout room durations. - `"raw"` - `"consolidated"` ### Returns - `SessionGetSessionParticipantsResponse` - `data?: Data` - `participants?: Array` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `preset_name?: string` Name of the preset associated with the participant. - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionParticipants('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "paging": { "end_offset": 2, "start_offset": 1, "total_count": 123 }, "participants": [ { "created_at": "2023-02-01T10:51:08.039Z", "custom_participant_id": "83qi0i", "display_name": "Mark", "duration": 5.8097, "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296", "joined_at": "2023-02-01T10:51:08.030Z", "left_at": "2023-02-01T10:56:56.612Z", "preset_name": "webinar_participant", "updated_at": "2023-02-01T10:56:56.618Z", "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81" }, { "created_at": "2023-02-01T10:50:36.853Z", "custom_participant_id": "3uggr", "display_name": "Henry", "duration": 6.9263, "id": "51fdf95f-d893-471a-922b-7db7adb14453", "joined_at": "2023-02-01T10:50:36.846Z\"", "left_at": "2023-02-01T10:57:32.424Z", "preset_name": "webinar_participant", "updated_at": "2023-02-01T10:57:32.431Z", "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb" } ] }, "success": true } ``` ## Fetch details of a participant `client.realtimeKit.sessions.getSessionParticipantDetails(stringappId, stringsessionId, stringparticipantId, SessionGetSessionParticipantDetailsParamsparams, RequestOptionsoptions?): SessionGetSessionParticipantDetailsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}` Returns details of the given participant ID along with call statistics for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `participantId: string` - `params: SessionGetSessionParticipantDetailsParams` - `account_id: string` Path param: The account identifier tag. - `filters?: "device_info" | "ip_information" | "precall_network_information" | 2 more` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `"device_info"` - `"ip_information"` - `"precall_network_information"` - `"events"` - `"quality_stats"` - `include_peer_events?: boolean` Query param: if true, response includes all the peer events of participant. ### Returns - `SessionGetSessionParticipantDetailsResponse` - `data?: Data` - `participant?: Participant` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `peer_stats?: PeerStats` - `config?: string` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `memory?: number` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `portal?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughtput?: number` - `turn_connectivity?: boolean` - `status?: string` - `preset_name?: string` Name of the preset associated with the participant. - `quality_stats?: Array` - `audio_bandwidth?: number` - `audio_packet_loss?: number` - `audio_stats?: Array` - `concealment_events?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `average_quality?: number` - `end?: string` - `peer_id?: string` - `start?: string` - `video_bandwidth?: number` - `video_packet_loss?: number` - `video_stats?: Array` - `frame_height?: number` - `frame_width?: number` - `frames_dropped?: number` - `frames_per_second?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionParticipantDetails( 'app_id', 'session_id', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "participant": { "id": "id", "created_at": "created_at", "custom_participant_id": "custom_participant_id", "display_name": "display_name", "duration": 0, "joined_at": "joined_at", "left_at": "left_at", "peer_stats": { "config": "config", "device_info": { "browser": "browser", "browser_version": "browser_version", "cpus": 0, "engine": "engine", "is_mobile": true, "memory": 0, "os": "os", "os_version": "os_version", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "events": [ { "timestamp": "timestamp", "type": "type" } ], "ip_information": { "city": "city", "country": "country", "ip_location": "ip_location", "ipv4": "ipv4", "org": "org", "portal": "portal", "region": "region", "timezone": "timezone" }, "precall_network_information": { "backend_rtt": 0, "effective_networktype": "effective_networktype", "fractional_loss": 0, "jitter": 0, "reflexive_connectivity": true, "relay_connectivity": true, "rtt": 0, "throughtput": 0, "turn_connectivity": true }, "status": "status" }, "preset_name": "preset_name", "quality_stats": [ { "audio_bandwidth": 0, "audio_packet_loss": 0, "audio_stats": [ { "concealment_events": 0, "jitter": 0, "packets_lost": 0, "quality": 0, "timestamp": "timestamp" } ], "average_quality": 0, "end": "end", "peer_id": "peer_id", "start": "start", "video_bandwidth": 0, "video_packet_loss": 0, "video_stats": [ { "frame_height": 0, "frame_width": 0, "frames_dropped": 0, "frames_per_second": 0, "jitter": 0, "packets_lost": 0, "quality": 0, "timestamp": "timestamp" } ] } ], "updated_at": "updated_at", "user_id": "user_id" } }, "success": true } ``` ## Fetch all chat messages of a session `client.realtimeKit.sessions.getSessionChat(stringappId, stringsessionId, SessionGetSessionChatParamsparams, RequestOptionsoptions?): SessionGetSessionChatResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat` Returns a URL to download all chat messages of the session ID in CSV format. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionChatParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionChatResponse` - `data?: Data` - `chat_download_url: string` URL where the chat logs can be downloaded - `chat_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionChat('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "chat_download_url": "chat_download_url", "chat_download_url_expiry": "chat_download_url_expiry" }, "success": true } ``` ## Fetch the complete transcript for a session `client.realtimeKit.sessions.getSessionTranscripts(stringappId, stringsessionId, SessionGetSessionTranscriptsParamsparams, RequestOptionsoptions?): SessionGetSessionTranscriptsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript` Returns a URL to download the transcript for the session ID in CSV format. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionTranscriptsParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionTranscriptsResponse` - `data?: Data` - `sessionId: string` - `transcript_download_url: string` URL where the transcript can be downloaded - `transcript_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionTranscripts('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessionId": "sessionId", "transcript_download_url": "transcript_download_url", "transcript_download_url_expiry": "transcript_download_url_expiry" }, "success": true } ``` ## Fetch summary of transcripts for a session `client.realtimeKit.sessions.getSessionSummary(stringappId, stringsessionId, SessionGetSessionSummaryParamsparams, RequestOptionsoptions?): SessionGetSessionSummaryResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Returns a Summary URL to download the Summary of Transcripts for the session ID as plain text. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionSummaryParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionSummaryResponse` - `data?: Data` - `sessionId: string` - `summaryDownloadUrl: string` URL where the summary of transcripts can be downloaded - `summaryDownloadUrlExpiry: string` Time of Expiry before when you need to download the csv file. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionSummary('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessionId": "sessionId", "summaryDownloadUrl": "summaryDownloadUrl", "summaryDownloadUrlExpiry": "summaryDownloadUrlExpiry" }, "success": true } ``` ## Generate summary of Transcripts for the session `client.realtimeKit.sessions.generateSummaryOfTranscripts(stringappId, stringsessionId, SessionGenerateSummaryOfTranscriptsParamsparams, RequestOptionsoptions?): void` **post** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Trigger Summary generation of Transcripts for the session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGenerateSummaryOfTranscriptsParams` - `account_id: string` The account identifier tag. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.realtimeKit.sessions.generateSummaryOfTranscripts('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); ``` ## Fetch details of peer `client.realtimeKit.sessions.getParticipantDataFromPeerId(stringappId, stringpeerId, SessionGetParticipantDataFromPeerIDParamsparams, RequestOptionsoptions?): SessionGetParticipantDataFromPeerIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}` Returns details of the given peer ID along with call statistics for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `peerId: string` - `params: SessionGetParticipantDataFromPeerIDParams` - `account_id: string` Path param: The account identifier tag. - `filters?: "device_info" | "ip_information" | "precall_network_information" | 2 more` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `"device_info"` - `"ip_information"` - `"precall_network_information"` - `"events"` - `"quality_stats"` ### Returns - `SessionGetParticipantDataFromPeerIDResponse` - `data?: Data` - `participant?: Participant` - `id?: string` - `created_at?: string` - `custom_participant_id?: string` - `display_name?: string` - `duration?: number` - `joined_at?: string` - `left_at?: string` - `peer_report?: PeerReport` - `metadata?: Metadata` - `audio_devices_updates?: Array` - `browser_metadata?: BrowserMetadata` - `browser?: string` - `browser_version?: string` - `engine?: string` - `user_agent?: string` - `webgl_support?: string` - `candidate_pairs?: CandidatePairs` - `consuming_transport?: Array` - `producing_transport?: Array` - `available_outgoing_bitrate?: number` - `bytes_discarded_on_send?: number` - `bytes_received?: number` - `bytes_sent?: number` - `current_round_trip_time?: number` - `last_packet_received_timestamp?: number` - `last_packet_sent_timestamp?: number` - `local_candidate_address?: string` - `local_candidate_id?: string` - `local_candidate_network_type?: string` - `local_candidate_port?: number` - `local_candidate_protocol?: string` - `local_candidate_related_address?: string` - `local_candidate_related_port?: number` - `local_candidate_type?: string` - `nominated?: boolean` - `packets_discarded_on_send?: number` - `packets_received?: number` - `packets_sent?: number` - `remote_candidate_address?: string` - `remote_candidate_id?: string` - `remote_candidate_port?: number` - `remote_candidate_protocol?: string` - `remote_candidate_type?: string` - `total_round_trip_time?: number` - `device_info?: DeviceInfo` - `cpus?: number` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `events?: Array` - `name?: string` - `timestamp?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ipv4?: string` - `region?: string` - `timezone?: string` - `pc_metadata?: Array` - `effective_network_type?: string` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `timestamp?: string` - `turn_connectivity?: boolean` - `room_view_type?: string` - `sdk_name?: string` - `sdk_version?: string` - `selected_device_updates?: Array` - `speaker_devices_updates?: Array` - `video_devices_updates?: Array` - `quality?: Quality` - `audio_consumer?: Array` - `audio_consumer_cumulative?: unknown` - `audio_producer?: Array` - `bytes_sent?: number` - `jitter?: number` - `mid?: string` - `mos_quality?: number` - `packets_lost?: number` - `packets_sent?: number` - `producer_id?: string` - `rtt?: number` - `ssrc?: number` - `timestamp?: string` - `audio_producer_cumulative?: AudioProducerCumulative` - `packet_loss?: PacketLoss` - `"10_or_greater_event_fraction"?: number` - `"25_or_greater_event_fraction"?: number` - `"5_or_greater_event_fraction"?: number` - `"50_or_greater_event_fraction"?: number` - `avg?: number` - `quality_mos?: QualityMos` - `avg?: number` - `p50?: number` - `p75?: number` - `p90?: number` - `rtt?: RTT` - `"100ms_or_greater_event_fraction"?: number` - `"250ms_or_greater_event_fraction"?: number` - `"500ms_or_greater_event_fraction"?: number` - `avg?: number` - `screenshare_audio_consumer?: Array` - `screenshare_audio_consumer_cumulative?: unknown` - `screenshare_audio_producer?: Array` - `screenshare_audio_producer_cumulative?: unknown` - `screenshare_video_consumer?: Array` - `screenshare_video_consumer_cumulative?: unknown` - `screenshare_video_producer?: Array` - `screenshare_video_producer_cumulative?: unknown` - `video_consumer?: Array` - `video_consumer_cumulative?: unknown` - `video_producer?: Array` - `video_producer_cumulative?: unknown` - `peer_stats?: PeerStats` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `metadata?: Metadata` - `connection_info?: ConnectionInfo` - `backend_r_t_t?: number` - `connectivity?: Connectivity` - `host?: boolean` - `reflexive?: boolean` - `relay?: boolean` - `effective_network_type?: string` - `fractional_loss?: number` - `ip_details?: IPDetails` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip?: string` - `loc?: string` - `postal?: string` - `region?: string` - `timezone?: string` - `jitter?: number` - `location?: Location` - `coords?: Coords` - `latitude?: number` - `longitude?: number` - `r_t_t?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `quality_stats?: QualityStats` - `audio_bandwidth?: number` - `audio_stats?: Array` - `average_quality?: number` - `end?: string | null` - `first_audio_packet_received?: string` - `first_video_packet_received?: string` - `last_audio_packet_received?: string` - `last_video_packet_received?: string` - `peer_ids?: Array` - `start?: string | null` - `total_audio_packets?: number` - `total_audio_packets_lost?: number` - `total_video_packets?: number` - `total_video_packets_lost?: number` - `video_bandwidth?: number` - `video_stats?: Array` - `role?: string` - `updated_at?: string` - `user_id?: string` - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getParticipantDataFromPeerId( 'app_id', 'peer_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "participant": { "id": "id", "created_at": "created_at", "custom_participant_id": "custom_participant_id", "display_name": "display_name", "duration": 0, "joined_at": "joined_at", "left_at": "left_at", "peer_report": { "metadata": { "audio_devices_updates": [ {} ], "browser_metadata": { "browser": "browser", "browser_version": "browser_version", "engine": "engine", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "candidate_pairs": { "consuming_transport": [ {} ], "producing_transport": [ { "available_outgoing_bitrate": 0, "bytes_discarded_on_send": 0, "bytes_received": 0, "bytes_sent": 0, "current_round_trip_time": 0, "last_packet_received_timestamp": 0, "last_packet_sent_timestamp": 0, "local_candidate_address": "local_candidate_address", "local_candidate_id": "local_candidate_id", "local_candidate_network_type": "local_candidate_network_type", "local_candidate_port": 0, "local_candidate_protocol": "local_candidate_protocol", "local_candidate_related_address": "local_candidate_related_address", "local_candidate_related_port": 0, "local_candidate_type": "local_candidate_type", "nominated": true, "packets_discarded_on_send": 0, "packets_received": 0, "packets_sent": 0, "remote_candidate_address": "remote_candidate_address", "remote_candidate_id": "remote_candidate_id", "remote_candidate_port": 0, "remote_candidate_protocol": "remote_candidate_protocol", "remote_candidate_type": "remote_candidate_type", "total_round_trip_time": 0 } ] }, "device_info": { "cpus": 0, "is_mobile": true, "os": "os", "os_version": "os_version" }, "events": [ { "name": "name", "timestamp": "timestamp" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ipv4": "ipv4", "region": "region", "timezone": "timezone" }, "pc_metadata": [ { "effective_network_type": "effective_network_type", "reflexive_connectivity": true, "relay_connectivity": true, "timestamp": "timestamp", "turn_connectivity": true } ], "room_view_type": "room_view_type", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "selected_device_updates": [ {} ], "speaker_devices_updates": [ {} ], "video_devices_updates": [ {} ] }, "quality": { "audio_consumer": [ {} ], "audio_consumer_cumulative": {}, "audio_producer": [ { "bytes_sent": 0, "jitter": 0, "mid": "mid", "mos_quality": 0, "packets_lost": 0, "packets_sent": 0, "producer_id": "producer_id", "rtt": 0, "ssrc": 0, "timestamp": "timestamp" } ], "audio_producer_cumulative": { "packet_loss": { "10_or_greater_event_fraction": 0, "25_or_greater_event_fraction": 0, "5_or_greater_event_fraction": 0, "50_or_greater_event_fraction": 0, "avg": 0 }, "quality_mos": { "avg": 0, "p50": 0, "p75": 0, "p90": 0 }, "rtt": { "100ms_or_greater_event_fraction": 0, "250ms_or_greater_event_fraction": 0, "500ms_or_greater_event_fraction": 0, "avg": 0 } }, "screenshare_audio_consumer": [ {} ], "screenshare_audio_consumer_cumulative": {}, "screenshare_audio_producer": [ {} ], "screenshare_audio_producer_cumulative": {}, "screenshare_video_consumer": [ {} ], "screenshare_video_consumer_cumulative": {}, "screenshare_video_producer": [ {} ], "screenshare_video_producer_cumulative": {}, "video_consumer": [ {} ], "video_consumer_cumulative": {}, "video_producer": [ {} ], "video_producer_cumulative": {} } }, "peer_stats": { "device_info": { "browser": "browser", "browser_version": "browser_version", "cpus": 0, "engine": "engine", "is_mobile": true, "os": "os", "os_version": "os_version", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "events": [ { "metadata": { "connection_info": { "backend_r_t_t": 0, "connectivity": { "host": true, "reflexive": true, "relay": true }, "effective_network_type": "effective_network_type", "fractional_loss": 0, "ip_details": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip": "ip", "loc": "loc", "postal": "postal", "region": "region", "timezone": "timezone" }, "jitter": 0, "location": { "coords": { "latitude": 0, "longitude": 0 } }, "r_t_t": 0, "throughput": 0, "turn_connectivity": true } }, "timestamp": "timestamp", "type": "type" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip_location": "ip_location", "ipv4": "ipv4", "org": "org", "region": "region", "timezone": "timezone" }, "precall_network_information": { "backend_rtt": 0, "effective_networktype": "effective_networktype", "fractional_loss": 0, "jitter": 0, "reflexive_connectivity": true, "relay_connectivity": true, "rtt": 0, "throughput": 0, "turn_connectivity": true } }, "quality_stats": { "audio_bandwidth": 0, "audio_stats": [ {} ], "average_quality": 0, "end": "end", "first_audio_packet_received": "first_audio_packet_received", "first_video_packet_received": "first_video_packet_received", "last_audio_packet_received": "last_audio_packet_received", "last_video_packet_received": "last_video_packet_received", "peer_ids": [ "string" ], "start": "start", "total_audio_packets": 0, "total_audio_packets_lost": 0, "total_video_packets": 0, "total_video_packets_lost": 0, "video_bandwidth": 0, "video_stats": [ {} ] }, "role": "role", "updated_at": "updated_at", "user_id": "user_id" } }, "success": true } ``` ## Domain Types ### Session Get Sessions Response - `SessionGetSessionsResponse` - `data?: Data` - `sessions?: Array` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Session Get Session Details Response - `SessionGetSessionDetailsResponse` - `data?: Data` - `session?: Session` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Session Get Session Participants Response - `SessionGetSessionParticipantsResponse` - `data?: Data` - `participants?: Array` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `preset_name?: string` Name of the preset associated with the participant. - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Session Get Session Participant Details Response - `SessionGetSessionParticipantDetailsResponse` - `data?: Data` - `participant?: Participant` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `peer_stats?: PeerStats` - `config?: string` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `memory?: number` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `portal?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughtput?: number` - `turn_connectivity?: boolean` - `status?: string` - `preset_name?: string` Name of the preset associated with the participant. - `quality_stats?: Array` - `audio_bandwidth?: number` - `audio_packet_loss?: number` - `audio_stats?: Array` - `concealment_events?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `average_quality?: number` - `end?: string` - `peer_id?: string` - `start?: string` - `video_bandwidth?: number` - `video_packet_loss?: number` - `video_stats?: Array` - `frame_height?: number` - `frame_width?: number` - `frames_dropped?: number` - `frames_per_second?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Session Get Session Chat Response - `SessionGetSessionChatResponse` - `data?: Data` - `chat_download_url: string` URL where the chat logs can be downloaded - `chat_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Session Get Session Transcripts Response - `SessionGetSessionTranscriptsResponse` - `data?: Data` - `sessionId: string` - `transcript_download_url: string` URL where the transcript can be downloaded - `transcript_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Session Get Session Summary Response - `SessionGetSessionSummaryResponse` - `data?: Data` - `sessionId: string` - `summaryDownloadUrl: string` URL where the summary of transcripts can be downloaded - `summaryDownloadUrlExpiry: string` Time of Expiry before when you need to download the csv file. - `success?: boolean` ### Session Get Participant Data From Peer ID Response - `SessionGetParticipantDataFromPeerIDResponse` - `data?: Data` - `participant?: Participant` - `id?: string` - `created_at?: string` - `custom_participant_id?: string` - `display_name?: string` - `duration?: number` - `joined_at?: string` - `left_at?: string` - `peer_report?: PeerReport` - `metadata?: Metadata` - `audio_devices_updates?: Array` - `browser_metadata?: BrowserMetadata` - `browser?: string` - `browser_version?: string` - `engine?: string` - `user_agent?: string` - `webgl_support?: string` - `candidate_pairs?: CandidatePairs` - `consuming_transport?: Array` - `producing_transport?: Array` - `available_outgoing_bitrate?: number` - `bytes_discarded_on_send?: number` - `bytes_received?: number` - `bytes_sent?: number` - `current_round_trip_time?: number` - `last_packet_received_timestamp?: number` - `last_packet_sent_timestamp?: number` - `local_candidate_address?: string` - `local_candidate_id?: string` - `local_candidate_network_type?: string` - `local_candidate_port?: number` - `local_candidate_protocol?: string` - `local_candidate_related_address?: string` - `local_candidate_related_port?: number` - `local_candidate_type?: string` - `nominated?: boolean` - `packets_discarded_on_send?: number` - `packets_received?: number` - `packets_sent?: number` - `remote_candidate_address?: string` - `remote_candidate_id?: string` - `remote_candidate_port?: number` - `remote_candidate_protocol?: string` - `remote_candidate_type?: string` - `total_round_trip_time?: number` - `device_info?: DeviceInfo` - `cpus?: number` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `events?: Array` - `name?: string` - `timestamp?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ipv4?: string` - `region?: string` - `timezone?: string` - `pc_metadata?: Array` - `effective_network_type?: string` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `timestamp?: string` - `turn_connectivity?: boolean` - `room_view_type?: string` - `sdk_name?: string` - `sdk_version?: string` - `selected_device_updates?: Array` - `speaker_devices_updates?: Array` - `video_devices_updates?: Array` - `quality?: Quality` - `audio_consumer?: Array` - `audio_consumer_cumulative?: unknown` - `audio_producer?: Array` - `bytes_sent?: number` - `jitter?: number` - `mid?: string` - `mos_quality?: number` - `packets_lost?: number` - `packets_sent?: number` - `producer_id?: string` - `rtt?: number` - `ssrc?: number` - `timestamp?: string` - `audio_producer_cumulative?: AudioProducerCumulative` - `packet_loss?: PacketLoss` - `"10_or_greater_event_fraction"?: number` - `"25_or_greater_event_fraction"?: number` - `"5_or_greater_event_fraction"?: number` - `"50_or_greater_event_fraction"?: number` - `avg?: number` - `quality_mos?: QualityMos` - `avg?: number` - `p50?: number` - `p75?: number` - `p90?: number` - `rtt?: RTT` - `"100ms_or_greater_event_fraction"?: number` - `"250ms_or_greater_event_fraction"?: number` - `"500ms_or_greater_event_fraction"?: number` - `avg?: number` - `screenshare_audio_consumer?: Array` - `screenshare_audio_consumer_cumulative?: unknown` - `screenshare_audio_producer?: Array` - `screenshare_audio_producer_cumulative?: unknown` - `screenshare_video_consumer?: Array` - `screenshare_video_consumer_cumulative?: unknown` - `screenshare_video_producer?: Array` - `screenshare_video_producer_cumulative?: unknown` - `video_consumer?: Array` - `video_consumer_cumulative?: unknown` - `video_producer?: Array` - `video_producer_cumulative?: unknown` - `peer_stats?: PeerStats` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `metadata?: Metadata` - `connection_info?: ConnectionInfo` - `backend_r_t_t?: number` - `connectivity?: Connectivity` - `host?: boolean` - `reflexive?: boolean` - `relay?: boolean` - `effective_network_type?: string` - `fractional_loss?: number` - `ip_details?: IPDetails` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip?: string` - `loc?: string` - `postal?: string` - `region?: string` - `timezone?: string` - `jitter?: number` - `location?: Location` - `coords?: Coords` - `latitude?: number` - `longitude?: number` - `r_t_t?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `quality_stats?: QualityStats` - `audio_bandwidth?: number` - `audio_stats?: Array` - `average_quality?: number` - `end?: string | null` - `first_audio_packet_received?: string` - `first_video_packet_received?: string` - `last_audio_packet_received?: string` - `last_video_packet_received?: string` - `peer_ids?: Array` - `start?: string | null` - `total_audio_packets?: number` - `total_audio_packets_lost?: number` - `total_video_packets?: number` - `total_video_packets_lost?: number` - `video_bandwidth?: number` - `video_stats?: Array` - `role?: string` - `updated_at?: string` - `user_id?: string` - `success?: boolean` # Recordings ## Fetch all recordings for an App `client.realtimeKit.recordings.getRecordings(stringappId, RecordingGetRecordingsParamsparams, RequestOptionsoptions?): RecordingGetRecordingsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Returns all recordings for an App. If the `meeting_id` parameter is passed, returns all recordings for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `params: RecordingGetRecordingsParams` - `account_id: string` Path param: The account identifier tag. - `end_time?: string` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `expired?: boolean` Query param: If passed, only shows expired/non-expired recordings on RealtimeKit's bucket - `meeting_id?: string` Query param: ID of a meeting. Optional. Will limit results to only this meeting if passed. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: The search query string. You can search using the meeting ID or title. - `sort_by?: "invokedTime"` Query param - `"invokedTime"` - `sort_order?: "ASC" | "DESC"` Query param - `"ASC"` - `"DESC"` - `start_time?: string` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `status?: Array<"INVOKED" | "RECORDING" | "UPLOADING" | "UPLOADED">` Query param: Filter by one or more recording status - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` ### Returns - `RecordingGetRecordingsResponse` - `data: Array` - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `meeting?: Meeting` - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. - `recording_duration?: number` Total recording time in seconds. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.recordings.getRecordings('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "meeting": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" }, "recording_duration": 0, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Start recording a meeting `client.realtimeKit.recordings.startRecordings(stringappId, RecordingStartRecordingsParamsparams, RequestOptionsoptions?): RecordingStartRecordingsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used. ### Parameters - `appId: string` The app identifier tag. - `params: RecordingStartRecordingsParams` - `account_id: string` Path param: The account identifier tag. - `allow_multiple_recordings?: boolean` Body param: By default, a meeting allows only one recording to run at a time. Enabling the `allow_multiple_recordings` parameter to true allows you to initiate multiple recordings concurrently in the same meeting. This allows you to record separate videos of the same meeting with different configurations, such as portrait mode or landscape mode. - `audio_config?: AudioConfig` Body param: Object containing configuration regarding the audio that is being recorded. - `channel?: "mono" | "stereo"` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec?: "MP3" | "AAC"` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file?: boolean` Controls whether to export audio file seperately - `file_name_prefix?: string` Body param: Update the recording file name. - `interactive_config?: InteractiveConfig` Body param: Allows you to add timed metadata to your recordings, which are digital markers inserted into a video file to provide contextual information at specific points in the content range. The ID3 tags containing this information are available to clients on the playback timeline in HLS format. The output files are generated in a compressed .tar format. - `type?: "ID3"` The metadata is presented in the form of ID3 tags. - `"ID3"` - `max_seconds?: number` Body param: Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `meeting_id?: string` Body param: ID of the meeting to record. - `realtimekit_bucket_config?: RealtimekitBucketConfig` Body param - `enabled: boolean` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `rtmp_out_config?: RtmpOutConfig` Body param - `rtmp_url?: string` RTMP URL to stream to - `storage_config?: StorageConfig | null` Body param - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `url?: string` Body param: Pass a custom url to record arbitary screen - `video_config?: VideoConfig` Body param - `codec?: "H264" | "VP8"` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file?: boolean` Controls whether to export video file seperately - `height?: number` Height of the recording video in pixels - `watermark?: Watermark` Watermark to be added to the recording - `position?: "left top" | "right top" | "left bottom" | "right bottom"` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size?: Size` Size of the watermark - `height?: number` Height of the watermark in px - `width?: number` Width of the watermark in px - `url?: string` URL of the watermark image - `width?: number` Width of the recording video in pixels ### Returns - `RecordingStartRecordingsResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.recordings.startRecordings('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', audio_config: { channel: 'stereo', codec: 'AAC', export_file: true, }, file_name_prefix: 'string', interactive_config: { type: 'ID3' }, max_seconds: 60, meeting_id: '97440c6a-140b-40a9-9499-b23fd7a3868a', realtimekit_bucket_config: { enabled: true }, video_config: { codec: 'H264', export_file: true, height: 720, watermark: { position: 'left top', size: { height: 1, width: 1 }, url: 'http://example.com', }, width: 1280, }, }); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Fetch active recording `client.realtimeKit.recordings.getActiveRecordings(stringappId, stringmeetingId, RecordingGetActiveRecordingsParamsparams, RequestOptionsoptions?): RecordingGetActiveRecordingsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/active-recording/{meeting_id}` Returns the active recording details for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: RecordingGetActiveRecordingsParams` - `account_id: string` The account identifier tag. ### Returns - `RecordingGetActiveRecordingsResponse` - `data: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `success: boolean` Success status of the operation ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.recordings.getActiveRecordings('app_id', 'meeting_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0 }, "success": true } ``` ## Fetch details of a recording `client.realtimeKit.recordings.getOneRecording(stringappId, stringrecordingId, RecordingGetOneRecordingParamsparams, RequestOptionsoptions?): RecordingGetOneRecordingResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Returns details of a recording for the given recording ID. ### Parameters - `appId: string` The app identifier tag. - `recordingId: string` - `params: RecordingGetOneRecordingParams` - `account_id: string` The account identifier tag. ### Returns - `RecordingGetOneRecordingResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.recordings.getOneRecording('app_id', 'recording_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Pause/Resume/Stop recording `client.realtimeKit.recordings.pauseResumeStopRecording(stringappId, stringrecordingId, RecordingPauseResumeStopRecordingParamsparams, RequestOptionsoptions?): RecordingPauseResumeStopRecordingResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Pause/Resume/Stop a given recording ID. ### Parameters - `appId: string` - `recordingId: string` - `params: RecordingPauseResumeStopRecordingParams` - `account_id: string` Path param: The account identifier tag. - `action: "stop" | "pause" | "resume"` Body param - `"stop"` - `"pause"` - `"resume"` ### Returns - `RecordingPauseResumeStopRecordingResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.recordings.pauseResumeStopRecording( '2a95132c15732412d22c1476fa83f27a', 'recording_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', action: 'stop' }, ); console.log(response.success); ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Start recording audio and video tracks `client.realtimeKit.recordings.startTrackRecording(stringappId, RecordingStartTrackRecordingParamsparams, RequestOptionsoptions?): void` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/track` Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the [Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview). ### Parameters - `appId: string` The app identifier tag. - `params: RecordingStartTrackRecordingParams` - `account_id: string` Path param: The account identifier tag. - `layers: Record` Body param - `file_name_prefix?: string` A file name prefix to apply for files generated from this layer - `outputs?: Array` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `type?: "REALTIMEKIT_BUCKET" | "STORAGE_CONFIG"` The type of output destination this layer is being exported to. - `"REALTIMEKIT_BUCKET"` - `"STORAGE_CONFIG"` - `meeting_id: string` Body param: ID of the meeting to record. - `max_seconds?: number` Body param: Maximum seconds this recording should be active for (beta) ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.realtimeKit.recordings.startTrackRecording('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', layers: { default: { file_name_prefix: 'string', outputs: [{ type: 'REALTIMEKIT_BUCKET' }] }, 'default-video': { file_name_prefix: 'string', outputs: [{ type: 'REALTIMEKIT_BUCKET' }] }, }, meeting_id: 'string', max_seconds: 60, }); ``` ## Domain Types ### Recording Get Recordings Response - `RecordingGetRecordingsResponse` - `data: Array` - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `meeting?: Meeting` - `id: string` ID of the meeting. - `created_at: string` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: string` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start?: boolean` Specifies if the meeting should start getting livestreamed on start. - `persist_chat?: boolean` Specifies if Chat within a meeting should persist for a week. - `record_on_start?: boolean` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs?: number` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status?: "ACTIVE" | "INACTIVE"` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end?: boolean` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title?: string` Title of the meeting. - `recording_duration?: number` Total recording time in seconds. - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium - `paging: Paging` - `end_offset: number` - `start_offset: number` - `total_count: number` - `success: boolean` ### Recording Start Recordings Response - `RecordingStartRecordingsResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium ### Recording Get Active Recordings Response - `RecordingGetActiveRecordingsResponse` - `data: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `success: boolean` Success status of the operation ### Recording Get One Recording Response - `RecordingGetOneRecordingResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium ### Recording Pause Resume Stop Recording Response - `RecordingPauseResumeStopRecordingResponse` - `success: boolean` Success status of the operation - `data?: Data` Data returned by the operation - `id: string` ID of the recording - `audio_download_url: string | null` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: string | null` URL where the recording can be downloaded. - `download_url_expiry: string | null` Timestamp when the download URL expires. - `file_size: number | null` File size of the recording, in bytes. - `invoked_time: string` Timestamp when this recording was invoked. - `output_file_name: string` File name of the recording. - `session_id: string | null` ID of the meeting session this recording is for. - `started_time: string | null` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: "INVOKED" | "RECORDING" | "UPLOADING" | 3 more` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: string | null` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration?: number` Total recording time in seconds. - `start_reason?: StartReason` - `caller?: Caller` - `name?: string` Name of the user who started the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who started the recording. - `reason?: "API_CALL" | "RECORD_ON_START"` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason?: StopReason` - `caller?: Caller` - `name?: string` Name of the user who stopped the recording. - `type?: "ORGANIZATION" | "USER"` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_Id?: string` The user ID of the person who stopped the recording. - `reason?: "API_CALL" | "INTERNAL_ERROR" | "ALL_PEERS_LEFT"` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config?: StorageConfig | null` - `type: "aws" | "azure" | "digitalocean" | 2 more` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key?: string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method?: "KEY" | "PASSWORD"` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket?: string` Name of the storage medium's bucket. - `host?: string` SSH destination server host for SFTP type storage medium - `password?: string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path?: string` Path relative to the bucket root at which the recording will be placed. - `port?: number` SSH destination server port for SFTP type storage medium - `private_key?: string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region?: string` Region of the storage medium. - `secret?: string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username?: string` SSH destination server username for SFTP type storage medium # Webhooks ## Fetch all webhooks details `client.realtimeKit.webhooks.getWebhooks(stringappId, WebhookGetWebhooksParamsparams, RequestOptionsoptions?): WebhookGetWebhooksResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Returns details of all webhooks for an App. ### Parameters - `appId: string` The app identifier tag. - `params: WebhookGetWebhooksParams` - `account_id: string` The account identifier tag. ### Returns - `WebhookGetWebhooksResponse` - `data: Array` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.getWebhooks('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": [ { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" } ], "success": true } ``` ## Add a webhook `client.realtimeKit.webhooks.createWebhook(stringappId, WebhookCreateWebhookParamsparams, RequestOptionsoptions?): WebhookCreateWebhookResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Adds a new webhook to an App. ### Parameters - `appId: string` The app identifier tag. - `params: WebhookCreateWebhookParams` - `account_id: string` Path param: The account identifier tag. - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Body param: Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Body param: Name of the webhook - `url: string` Body param: URL this webhook will send events to - `enabled?: boolean` Body param: Set whether or not the webhook should be active when created ### Returns - `WebhookCreateWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.createWebhook('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', events: [ 'meeting.started', 'meeting.ended', 'meeting.participantJoined', 'meeting.participantLeft', 'meeting.chatSynced', 'recording.statusUpdate', 'livestreaming.statusUpdate', 'meeting.transcript', 'meeting.summary', ], name: 'All events webhook', url: 'https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Fetch details of a webhook `client.realtimeKit.webhooks.getWebhookById(stringappId, stringwebhookId, WebhookGetWebhookByIDParamsparams, RequestOptionsoptions?): WebhookGetWebhookByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Returns webhook details for the given webhook ID. ### Parameters - `appId: string` The app identifier tag. - `webhookId: string` - `params: WebhookGetWebhookByIDParams` - `account_id: string` The account identifier tag. ### Returns - `WebhookGetWebhookByIDResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.getWebhookById('app_id', 'webhook_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Replace a webhook `client.realtimeKit.webhooks.replaceWebhook(stringappId, stringwebhookId, WebhookReplaceWebhookParamsparams, RequestOptionsoptions?): WebhookReplaceWebhookResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Replace all details for the given webhook ID. ### Parameters - `appId: string` The app identifier tag. - `webhookId: string` - `params: WebhookReplaceWebhookParams` - `account_id: string` Path param: The account identifier tag. - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Body param: Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Body param: Name of the webhook - `url: string` Body param: URL this webhook will send events to - `enabled?: boolean` Body param: Set whether or not the webhook should be active when created ### Returns - `WebhookReplaceWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.replaceWebhook('app_id', 'webhook_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', events: [ 'meeting.started', 'meeting.ended', 'meeting.participantJoined', 'meeting.participantLeft', 'meeting.chatSynced', 'recording.statusUpdate', 'livestreaming.statusUpdate', 'meeting.transcript', 'meeting.summary', ], name: 'All events webhook', url: 'https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Edit a webhook `client.realtimeKit.webhooks.editWebhook(stringappId, stringwebhookId, WebhookEditWebhookParamsparams, RequestOptionsoptions?): WebhookEditWebhookResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Edits the webhook details for the given webhook ID. ### Parameters - `appId: string` The app identifier tag. - `webhookId: string` - `params: WebhookEditWebhookParams` - `account_id: string` Path param: The account identifier tag. - `enabled?: boolean` Body param - `events?: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Body param: Events that the webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.chatSynced"` - `"meeting.transcript"` - `"meeting.summary"` - `name?: string` Body param: Name of the webhook - `url?: string` Body param: URL the webhook will send events to ### Returns - `WebhookEditWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.editWebhook('app_id', 'webhook_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Delete a webhook `client.realtimeKit.webhooks.deleteWebhook(stringappId, stringwebhookId, WebhookDeleteWebhookParamsparams, RequestOptionsoptions?): WebhookDeleteWebhookResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Removes a webhook for the given webhook ID. ### Parameters - `appId: string` The app identifier tag. - `webhookId: string` - `params: WebhookDeleteWebhookParams` - `account_id: string` The account identifier tag. ### Returns - `WebhookDeleteWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.webhooks.deleteWebhook('app_id', 'webhook_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Domain Types ### Webhook Get Webhooks Response - `WebhookGetWebhooksResponse` - `data: Array` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Webhook Create Webhook Response - `WebhookCreateWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Webhook Get Webhook By ID Response - `WebhookGetWebhookByIDResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Webhook Replace Webhook Response - `WebhookReplaceWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Webhook Edit Webhook Response - `WebhookEditWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` ### Webhook Delete Webhook Response - `WebhookDeleteWebhookResponse` - `data: Data` - `id: string` ID of the webhook - `created_at: string` Timestamp when this webhook was created - `enabled: boolean` Set to true if the webhook is active - `events: Array<"meeting.started" | "meeting.ended" | "meeting.participantJoined" | 6 more>` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: string` Name of the webhook - `updated_at: string` Timestamp when this webhook was updated - `url: string` URL the webhook will send events to - `success: boolean` # Active Session ## Fetch details of an active session `client.realtimeKit.activeSession.getActiveSession(stringappId, stringmeetingId, ActiveSessionGetActiveSessionParamsparams, RequestOptionsoptions?): ActiveSessionGetActiveSessionResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session` Returns details of an ongoing active session for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: ActiveSessionGetActiveSessionParams` - `account_id: string` The account identifier tag. ### Returns - `ActiveSessionGetActiveSessionResponse` - `data?: Data` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.activeSession.getActiveSession('app_id', 'meeting_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} }, "success": true } ``` ## Kick participants from an active session `client.realtimeKit.activeSession.kickParticipants(stringappId, stringmeetingId, ActiveSessionKickParticipantsParamsparams, RequestOptionsoptions?): ActiveSessionKickParticipantsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick` Kicks one or more participants from an active session using user ID or custom participant ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: ActiveSessionKickParticipantsParams` - `account_id: string` Path param: The account identifier tag. - `custom_participant_ids: Array` Body param - `participant_ids: Array` Body param ### Returns - `ActiveSessionKickParticipantsResponse` - `data?: Data` - `action?: string` - `participants?: Array` - `id: string` ID of the session participant - `created_at: string` - `updated_at: string` - `email?: string` Email of the session participant. - `name?: string` Name of the session participant. - `picture?: string` A URL pointing to a picture of the participant. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.activeSession.kickParticipants('app_id', 'meeting_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', custom_participant_ids: ['string'], participant_ids: ['string'], }); console.log(response.data); ``` #### Response ```json { "data": { "action": "action", "participants": [ { "id": "id", "created_at": "created_at", "updated_at": "updated_at", "email": "email", "name": "name", "picture": "picture" } ] }, "success": true } ``` ## Kick all participants `client.realtimeKit.activeSession.kickAllParticipants(stringappId, stringmeetingId, ActiveSessionKickAllParticipantsParamsparams, RequestOptionsoptions?): ActiveSessionKickAllParticipantsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all` Kicks all participants from an active session for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: ActiveSessionKickAllParticipantsParams` - `account_id: string` The account identifier tag. ### Returns - `ActiveSessionKickAllParticipantsResponse` - `data?: Data` - `action?: string` - `kicked_participants_count?: number` - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.activeSession.kickAllParticipants( 'app_id', 'meeting_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "action": "action", "kicked_participants_count": 0 }, "success": true } ``` ## Create a poll `client.realtimeKit.activeSession.createPoll(stringappId, stringmeetingId, ActiveSessionCreatePollParamsparams, RequestOptionsoptions?): ActiveSessionCreatePollResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll` Creates a new poll in an active session for the given meeting ID. ### Parameters - `appId: string` The app identifier tag. - `meetingId: string` - `params: ActiveSessionCreatePollParams` - `account_id: string` Path param: The account identifier tag. - `options: Array` Body param: Different options for the question - `question: string` Body param: Question of the poll - `anonymous?: boolean` Body param: if voters on a poll are anonymous - `hide_votes?: boolean` Body param: if votes on an option are visible before a person votes ### Returns - `ActiveSessionCreatePollResponse` - `data?: Data` - `action?: string` - `poll?: Poll` - `id: string` ID of the poll - `options: Array