Skip to content
Start here

Update a preset

client.realtimeKit.presets.update(stringappId, stringpresetId, PresetUpdateParams { account_id, config, name, 2 more } params, RequestOptionsoptions?): PresetUpdateResponse { data, success }
PATCH/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}

Update a preset by the provided preset ID

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
appId: string

The app identifier tag.

maxLength32
presetId: string
params: PresetUpdateParams { account_id, config, name, 2 more }
account_id: string

Path param: The account identifier tag.

maxLength32
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 { desktop, mobile }

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 { screenshare, video }

Media configuration options. eg: Video quality

screenshare?: Screenshare { frame_rate, quality }

Configuration options for participant screen shares

frame_rate?: number

Frame rate of screen share

quality?: "hd" | "vga" | "qvga"

Quality of screen share

One of the following:
"hd"
"vga"
"qvga"
video?: Video { frame_rate, quality }

Configuration options for participant videos

frame_rate?: number

Frame rate of participants' video

maximum30
quality?: "hd" | "vga" | "qvga"

Video quality of participants

One of the following:
"hd"
"vga"
"qvga"
view_type?: "GROUP_CALL" | "WEBINAR" | "AUDIO_ROOM"

Type of the meeting

One of the following:
"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 { private, public }

Chat permissions

private?: Private { can_receive, can_send, files, text }
can_receive?: boolean
can_send?: boolean
files?: boolean
text?: boolean
public?: Public { can_send, files, text }
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, can_switch_connected_meetings, can_switch_to_parent_meeting }
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 { audio, screenshare, video }

Media permissions

audio?: Audio { can_produce }

Audio permissions

can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce audio

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
screenshare?: Screenshare { can_produce }

Screenshare permissions

can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce screen share video

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
video?: Video { can_produce }

Video permissions

can_produce?: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce video

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
pin_participant?: boolean
plugins?: Plugins { can_close, can_edit_config, can_start, config }

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 { access_control, handles_view_only }
One of the following:
string
UnionMember1 { access_control, handles_view_only }
access_control?: "FULL_ACCESS" | "VIEW_ONLY"
One of the following:
"FULL_ACCESS"
"VIEW_ONLY"
handles_view_only?: boolean
polls?: Polls { can_create, can_view, can_vote }

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

One of the following:
"RECORDER"
"LIVESTREAMER"
"NONE"
show_participant_list?: boolean
waiting_room_type?: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"

Waiting room type

One of the following:
"SKIP"
"ON_PRIVILEGED_USER_ENTRY"
"SKIP_ON_ACCEPT"
ui?: UI

Body param

config_diff?: unknown
design_tokens?: DesignTokens { border_radius, border_width, colors, 3 more }
border_radius?: "rounded"
border_width?: "thin"
colors?: Colors { background, brand, danger, 5 more }
background?: Background { 1000, 600, 700, 2 more }
"1000"?: string
"600"?: string
"700"?: string
"800"?: string
"900"?: string
brand?: Brand { 300, 400, 500, 2 more }
"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
spacing_base?: number
theme?: "dark"
ReturnsExpand Collapse
PresetUpdateResponse { data, success }
data: Data { id, config, name, 2 more }

Data returned by the operation

id: string

ID of the preset

formatuuid
config: Config { max_screenshare_count, max_video_streams, media, view_type }
max_screenshare_count: number

Maximum number of screen shares that can be active at a given time

max_video_streams: MaxVideoStreams { desktop, mobile }

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 { screenshare, video, audio }

Media configuration options. eg: Video quality

screenshare: Screenshare { frame_rate, quality }

Configuration options for participant screen shares

frame_rate: number

Frame rate of screen share

quality: "hd" | "vga" | "qvga"

Quality of screen share

One of the following:
"hd"
"vga"
"qvga"
video: Video { frame_rate, quality }

Configuration options for participant videos

frame_rate: number

Frame rate of participants' video

maximum30
quality: "hd" | "vga" | "qvga"

Video quality of participants

One of the following:
"hd"
"vga"
"qvga"
audio?: Audio { enable_high_bitrate, enable_stereo }

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

One of the following:
"GROUP_CALL"
"WEBINAR"
"AUDIO_ROOM"
name: string

Name of the preset

ui: UI { design_tokens, config_diff }
design_tokens: DesignTokens { border_radius, border_width, colors, 3 more }
border_radius: "rounded"
border_width: "thin"
colors: Colors { background, brand, danger, 5 more }
background: Background { 1000, 600, 700, 2 more }
"1000": string
"600": string
"700": string
"800": string
"900": string
brand: Brand { 300, 400, 500, 2 more }
"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
spacing_base: number
theme: "dark"
config_diff?: unknown
permissions?: Permissions { accept_waiting_requests, can_accept_production_requests, can_change_participant_permissions, 19 more }
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 { private, public }

Chat permissions

private: Private { can_receive, can_send, files, text }
can_receive: boolean
can_send: boolean
files: boolean
text: boolean
public: Public { can_send, files, text }
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, can_switch_connected_meetings, can_switch_to_parent_meeting }
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 { audio, screenshare, video }

Media permissions

audio: Audio { can_produce }

Audio permissions

can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce audio

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
screenshare: Screenshare { can_produce }

Screenshare permissions

can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce screen share video

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
video: Video { can_produce }

Video permissions

can_produce: "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"

Can produce video

One of the following:
"ALLOWED"
"NOT_ALLOWED"
"CAN_REQUEST"
pin_participant: boolean
plugins: Plugins { can_close, can_edit_config, can_start, config }

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 { access_control, handles_view_only }
One of the following:
string
UnionMember1 { access_control, handles_view_only }
access_control: "FULL_ACCESS" | "VIEW_ONLY"
One of the following:
"FULL_ACCESS"
"VIEW_ONLY"
handles_view_only: boolean
polls: Polls { can_create, can_view, can_vote }

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

One of the following:
"RECORDER"
"LIVESTREAMER"
"NONE"
show_participant_list: boolean
waiting_room_type: "SKIP" | "ON_PRIVILEGED_USER_ENTRY" | "SKIP_ON_ACCEPT"

Waiting room type

One of the following:
"SKIP"
"ON_PRIVILEGED_USER_ENTRY"
"SKIP_ON_ACCEPT"
is_recorder?: boolean
success: boolean

Success status of the operation

Update a preset

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);
{
  "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
}
Returns Examples
{
  "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
}