Skip to content
Start here

Replace a preset

client.RealtimeKit.Presets.ReplacePresetByID(ctx, appID, presetID, params) (*PresetReplacePresetByIDResponse, error)
PUT/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}

Replace all details for the preset using 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
formatuuid
params PresetReplacePresetByIDParams
AccountID param.Field[string]

Path param: The account identifier tag.

maxLength32

Body param

MaxScreenshareCount float64

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

MaxVideoStreams PresetReplacePresetByIDParamsConfigMaxVideoStreams

Maximum number of streams that are visible on a device

Desktop float64

Maximum number of video streams visible on desktop devices

Mobile float64

Maximum number of streams visible on mobile devices

Media PresetReplacePresetByIDParamsConfigMedia

Media configuration options. eg: Video quality

Screenshare PresetReplacePresetByIDParamsConfigMediaScreenshare

Configuration options for participant screen shares

FrameRate float64

Frame rate of screen share

Quality PresetReplacePresetByIDParamsConfigMediaScreenshareQuality

Quality of screen share

One of the following:
const PresetReplacePresetByIDParamsConfigMediaScreenshareQualityHD PresetReplacePresetByIDParamsConfigMediaScreenshareQuality = "hd"
const PresetReplacePresetByIDParamsConfigMediaScreenshareQualityVga PresetReplacePresetByIDParamsConfigMediaScreenshareQuality = "vga"
const PresetReplacePresetByIDParamsConfigMediaScreenshareQualityQvga PresetReplacePresetByIDParamsConfigMediaScreenshareQuality = "qvga"
const PresetReplacePresetByIDParamsConfigMediaScreenshareQualityFhd PresetReplacePresetByIDParamsConfigMediaScreenshareQuality = "fhd"
const PresetReplacePresetByIDParamsConfigMediaScreenshareQualityUhd PresetReplacePresetByIDParamsConfigMediaScreenshareQuality = "uhd"
Video PresetReplacePresetByIDParamsConfigMediaVideo

Configuration options for participant videos

FrameRate float64

Frame rate of participants’ video

maximum30
Quality PresetReplacePresetByIDParamsConfigMediaVideoQuality

Video quality of participants

One of the following:
const PresetReplacePresetByIDParamsConfigMediaVideoQualityHD PresetReplacePresetByIDParamsConfigMediaVideoQuality = "hd"
const PresetReplacePresetByIDParamsConfigMediaVideoQualityVga PresetReplacePresetByIDParamsConfigMediaVideoQuality = "vga"
const PresetReplacePresetByIDParamsConfigMediaVideoQualityQvga PresetReplacePresetByIDParamsConfigMediaVideoQuality = "qvga"
const PresetReplacePresetByIDParamsConfigMediaVideoQualityFhd PresetReplacePresetByIDParamsConfigMediaVideoQuality = "fhd"
const PresetReplacePresetByIDParamsConfigMediaVideoQualityUhd PresetReplacePresetByIDParamsConfigMediaVideoQuality = "uhd"
Simulcast boolOptional

Enable simulcast for participant videos.

Audio PresetReplacePresetByIDParamsConfigMediaAudioOptional

Control options for Audio quality.

EnableHighBitrate boolOptional

Enable High Quality Audio for your meetings

EnableStereo boolOptional

Enable Stereo for your meetings

ViewType PresetReplacePresetByIDParamsConfigViewType

Type of the meeting

One of the following:
const PresetReplacePresetByIDParamsConfigViewTypeGroupCall PresetReplacePresetByIDParamsConfigViewType = "GROUP_CALL"
const PresetReplacePresetByIDParamsConfigViewTypeWebinar PresetReplacePresetByIDParamsConfigViewType = "WEBINAR"
const PresetReplacePresetByIDParamsConfigViewTypeAudioRoom PresetReplacePresetByIDParamsConfigViewType = "AUDIO_ROOM"
const PresetReplacePresetByIDParamsConfigViewTypeLivestream PresetReplacePresetByIDParamsConfigViewType = "LIVESTREAM"
LivestreamViewerQualities []int64Optional

Livestream viewer quality levels.

Name param.Field[string]

Body param: Name of the preset

Body param

AcceptWaitingRequests bool

Whether this participant can accept waiting requests

CanAcceptProductionRequests bool
CanChangeParticipantPermissions bool
CanEditDisplayName bool
CanLivestream bool
CanRecord bool
CanSpotlight bool
Chat PresetReplacePresetByIDParamsPermissionsChat
Private PresetReplacePresetByIDParamsPermissionsChatPrivate
CanReceive bool
CanSend bool
Files bool
Text bool
Public PresetReplacePresetByIDParamsPermissionsChatPublic
CanSend bool

Can send messages in general

Files bool

Can send file messages

Text bool

Can send text messages

ConnectedMeetings PresetReplacePresetByIDParamsPermissionsConnectedMeetings
CanAlterConnectedMeetings bool
CanSwitchConnectedMeetings bool
CanSwitchToParentMeeting bool
DisableParticipantAudio bool
DisableParticipantScreensharing bool
DisableParticipantVideo bool
HiddenParticipant bool

Whether this participant is visible to others or not

KickParticipant bool
Media PresetReplacePresetByIDParamsPermissionsMedia

Media permissions

Audio PresetReplacePresetByIDParamsPermissionsMediaAudio

Audio permissions

CanProduce PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduce

Can produce audio

One of the following:
const PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduceAllowed PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduce = "ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduceNotAllowed PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduceCanRequest PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduce = "CAN_REQUEST"
Screenshare PresetReplacePresetByIDParamsPermissionsMediaScreenshare

Screenshare permissions

CanProduce PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduce

Can produce screen share video

One of the following:
const PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduceAllowed PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduce = "ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduceNotAllowed PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduceCanRequest PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"
Video PresetReplacePresetByIDParamsPermissionsMediaVideo

Video permissions

CanProduce PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduce

Can produce video

One of the following:
const PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduceAllowed PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduce = "ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduceNotAllowed PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduceCanRequest PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduce = "CAN_REQUEST"
PinParticipant bool
Plugins PresetReplacePresetByIDParamsPermissionsPlugins

Plugin permissions

CanClose bool

Can close plugins that are already open

CanEditConfig bool

Can edit plugin config

CanStart bool

Can start plugins

Config map[string, PresetReplacePresetByIDParamsPermissionsPluginsConfig]

Plugin configuration keyed by plugin UUID.

AccessControl PresetReplacePresetByIDParamsPermissionsPluginsConfigAccessControlOptional
One of the following:
const PresetReplacePresetByIDParamsPermissionsPluginsConfigAccessControlFullAccess PresetReplacePresetByIDParamsPermissionsPluginsConfigAccessControl = "FULL_ACCESS"
const PresetReplacePresetByIDParamsPermissionsPluginsConfigAccessControlViewOnly PresetReplacePresetByIDParamsPermissionsPluginsConfigAccessControl = "VIEW_ONLY"
HandlesViewOnly boolOptional
Polls PresetReplacePresetByIDParamsPermissionsPolls

Poll permissions

CanCreate bool

Can create polls

CanView bool

Can view polls

CanVote bool

Can vote on polls

RecorderType PresetReplacePresetByIDParamsPermissionsRecorderType

Type of the recording peer

One of the following:
const PresetReplacePresetByIDParamsPermissionsRecorderTypeRecorder PresetReplacePresetByIDParamsPermissionsRecorderType = "RECORDER"
const PresetReplacePresetByIDParamsPermissionsRecorderTypeLivestreamer PresetReplacePresetByIDParamsPermissionsRecorderType = "LIVESTREAMER"
const PresetReplacePresetByIDParamsPermissionsRecorderTypeNone PresetReplacePresetByIDParamsPermissionsRecorderType = "NONE"
ShowParticipantList bool
WaitingRoomType PresetReplacePresetByIDParamsPermissionsWaitingRoomType

Waiting room type

One of the following:
const PresetReplacePresetByIDParamsPermissionsWaitingRoomTypeSkip PresetReplacePresetByIDParamsPermissionsWaitingRoomType = "SKIP"
const PresetReplacePresetByIDParamsPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetReplacePresetByIDParamsPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"
const PresetReplacePresetByIDParamsPermissionsWaitingRoomTypeSkipOnAccept PresetReplacePresetByIDParamsPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"
AcceptStageRequests boolOptional
IsRecorder boolOptional
StageAccess PresetReplacePresetByIDParamsPermissionsStageAccessOptional
One of the following:
const PresetReplacePresetByIDParamsPermissionsStageAccessAllowed PresetReplacePresetByIDParamsPermissionsStageAccess = "ALLOWED"
const PresetReplacePresetByIDParamsPermissionsStageAccessNotAllowed PresetReplacePresetByIDParamsPermissionsStageAccess = "NOT_ALLOWED"
const PresetReplacePresetByIDParamsPermissionsStageAccessCanRequest PresetReplacePresetByIDParamsPermissionsStageAccess = "CAN_REQUEST"
StageEnabled boolOptional
TranscriptionEnabled boolOptional

Body param

DesignTokens PresetReplacePresetByIDParamsUIDesignTokens
BorderRadius PresetReplacePresetByIDParamsUIDesignTokensBorderRadius
One of the following:
const PresetReplacePresetByIDParamsUIDesignTokensBorderRadiusSharp PresetReplacePresetByIDParamsUIDesignTokensBorderRadius = "sharp"
const PresetReplacePresetByIDParamsUIDesignTokensBorderRadiusRounded PresetReplacePresetByIDParamsUIDesignTokensBorderRadius = "rounded"
const PresetReplacePresetByIDParamsUIDesignTokensBorderRadiusExtraRounded PresetReplacePresetByIDParamsUIDesignTokensBorderRadius = "extra-rounded"
const PresetReplacePresetByIDParamsUIDesignTokensBorderRadiusCircular PresetReplacePresetByIDParamsUIDesignTokensBorderRadius = "circular"
BorderWidth PresetReplacePresetByIDParamsUIDesignTokensBorderWidth
One of the following:
const PresetReplacePresetByIDParamsUIDesignTokensBorderWidthNone PresetReplacePresetByIDParamsUIDesignTokensBorderWidth = "none"
const PresetReplacePresetByIDParamsUIDesignTokensBorderWidthThin PresetReplacePresetByIDParamsUIDesignTokensBorderWidth = "thin"
const PresetReplacePresetByIDParamsUIDesignTokensBorderWidthFat PresetReplacePresetByIDParamsUIDesignTokensBorderWidth = "fat"
Colors PresetReplacePresetByIDParamsUIDesignTokensColors
Background PresetReplacePresetByIDParamsUIDesignTokensColorsBackground
Number1000 string
Number600 string
Number700 string
Number800 string
Number900 string
Brand PresetReplacePresetByIDParamsUIDesignTokensColorsBrand
Number300 string
Number400 string
Number500 string
Number600 string
Number700 string
Danger string
Success string
Text string
TextOnBrand string
VideoBg string
Warning string
SpacingBase float64
minimum1
Theme PresetReplacePresetByIDParamsUIDesignTokensTheme
One of the following:
const PresetReplacePresetByIDParamsUIDesignTokensThemeDarkest PresetReplacePresetByIDParamsUIDesignTokensTheme = "darkest"
const PresetReplacePresetByIDParamsUIDesignTokensThemeDark PresetReplacePresetByIDParamsUIDesignTokensTheme = "dark"
const PresetReplacePresetByIDParamsUIDesignTokensThemeLight PresetReplacePresetByIDParamsUIDesignTokensTheme = "light"
FontFamily stringOptional
GoogleFont stringOptional
ReturnsExpand Collapse
type PresetReplacePresetByIDResponse struct{…}
Data PresetReplacePresetByIDResponseData

Data returned by the operation

ID string

ID of the preset

formatuuid
Config PresetReplacePresetByIDResponseDataConfig
MaxScreenshareCount float64

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

MaxVideoStreams PresetReplacePresetByIDResponseDataConfigMaxVideoStreams

Maximum number of streams that are visible on a device

Desktop float64

Maximum number of video streams visible on desktop devices

Mobile float64

Maximum number of streams visible on mobile devices

Media PresetReplacePresetByIDResponseDataConfigMedia

Media configuration options. eg: Video quality

Screenshare PresetReplacePresetByIDResponseDataConfigMediaScreenshare

Configuration options for participant screen shares

FrameRate float64

Frame rate of screen share

Quality PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality

Quality of screen share

One of the following:
const PresetReplacePresetByIDResponseDataConfigMediaScreenshareQualityHD PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality = "hd"
const PresetReplacePresetByIDResponseDataConfigMediaScreenshareQualityVga PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality = "vga"
const PresetReplacePresetByIDResponseDataConfigMediaScreenshareQualityQvga PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality = "qvga"
const PresetReplacePresetByIDResponseDataConfigMediaScreenshareQualityFhd PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality = "fhd"
const PresetReplacePresetByIDResponseDataConfigMediaScreenshareQualityUhd PresetReplacePresetByIDResponseDataConfigMediaScreenshareQuality = "uhd"
Video PresetReplacePresetByIDResponseDataConfigMediaVideo

Configuration options for participant videos

FrameRate float64

Frame rate of participants’ video

maximum30
Quality PresetReplacePresetByIDResponseDataConfigMediaVideoQuality

Video quality of participants

One of the following:
const PresetReplacePresetByIDResponseDataConfigMediaVideoQualityHD PresetReplacePresetByIDResponseDataConfigMediaVideoQuality = "hd"
const PresetReplacePresetByIDResponseDataConfigMediaVideoQualityVga PresetReplacePresetByIDResponseDataConfigMediaVideoQuality = "vga"
const PresetReplacePresetByIDResponseDataConfigMediaVideoQualityQvga PresetReplacePresetByIDResponseDataConfigMediaVideoQuality = "qvga"
const PresetReplacePresetByIDResponseDataConfigMediaVideoQualityFhd PresetReplacePresetByIDResponseDataConfigMediaVideoQuality = "fhd"
const PresetReplacePresetByIDResponseDataConfigMediaVideoQualityUhd PresetReplacePresetByIDResponseDataConfigMediaVideoQuality = "uhd"
Simulcast boolOptional

Enable simulcast for participant videos.

Audio PresetReplacePresetByIDResponseDataConfigMediaAudioOptional

Control options for Audio quality.

EnableHighBitrate boolOptional

Enable High Quality Audio for your meetings

EnableStereo boolOptional

Enable Stereo for your meetings

ViewType PresetReplacePresetByIDResponseDataConfigViewType

Type of the meeting

One of the following:
const PresetReplacePresetByIDResponseDataConfigViewTypeGroupCall PresetReplacePresetByIDResponseDataConfigViewType = "GROUP_CALL"
const PresetReplacePresetByIDResponseDataConfigViewTypeWebinar PresetReplacePresetByIDResponseDataConfigViewType = "WEBINAR"
const PresetReplacePresetByIDResponseDataConfigViewTypeAudioRoom PresetReplacePresetByIDResponseDataConfigViewType = "AUDIO_ROOM"
const PresetReplacePresetByIDResponseDataConfigViewTypeLivestream PresetReplacePresetByIDResponseDataConfigViewType = "LIVESTREAM"
LivestreamViewerQualities []int64Optional

Livestream viewer quality levels.

CreatedAt Time

Timestamp this preset was created at

formatdate-time
Name string

Name of the preset

Permissions PresetReplacePresetByIDResponseDataPermissions
AcceptWaitingRequests bool

Whether this participant can accept waiting requests

CanAcceptProductionRequests bool
CanChangeParticipantPermissions bool
CanEditDisplayName bool
CanLivestream bool
CanRecord bool
CanSpotlight bool
Chat PresetReplacePresetByIDResponseDataPermissionsChat
Private PresetReplacePresetByIDResponseDataPermissionsChatPrivate
CanReceive bool
CanSend bool
Files bool
Text bool
Public PresetReplacePresetByIDResponseDataPermissionsChatPublic
CanSend bool

Can send messages in general

Files bool

Can send file messages

Text bool

Can send text messages

ConnectedMeetings PresetReplacePresetByIDResponseDataPermissionsConnectedMeetings
CanAlterConnectedMeetings bool
CanSwitchConnectedMeetings bool
CanSwitchToParentMeeting bool
DisableParticipantAudio bool
DisableParticipantScreensharing bool
DisableParticipantVideo bool
HiddenParticipant bool

Whether this participant is visible to others or not

KickParticipant bool
Media PresetReplacePresetByIDResponseDataPermissionsMedia

Media permissions

Audio PresetReplacePresetByIDResponseDataPermissionsMediaAudio

Audio permissions

CanProduce PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduce

Can produce audio

One of the following:
const PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduceAllowed PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduceCanRequest PresetReplacePresetByIDResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"
Screenshare PresetReplacePresetByIDResponseDataPermissionsMediaScreenshare

Screenshare permissions

CanProduce PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduce

Can produce screen share video

One of the following:
const PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetReplacePresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"
Video PresetReplacePresetByIDResponseDataPermissionsMediaVideo

Video permissions

CanProduce PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduce

Can produce video

One of the following:
const PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduceAllowed PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduceCanRequest PresetReplacePresetByIDResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"
PinParticipant bool
Plugins PresetReplacePresetByIDResponseDataPermissionsPlugins

Plugin permissions

CanClose bool

Can close plugins that are already open

CanEditConfig bool

Can edit plugin config

CanStart bool

Can start plugins

Config map[string, PresetReplacePresetByIDResponseDataPermissionsPluginsConfig]

Plugin configuration keyed by plugin UUID.

AccessControl PresetReplacePresetByIDResponseDataPermissionsPluginsConfigAccessControlOptional
One of the following:
const PresetReplacePresetByIDResponseDataPermissionsPluginsConfigAccessControlFullAccess PresetReplacePresetByIDResponseDataPermissionsPluginsConfigAccessControl = "FULL_ACCESS"
const PresetReplacePresetByIDResponseDataPermissionsPluginsConfigAccessControlViewOnly PresetReplacePresetByIDResponseDataPermissionsPluginsConfigAccessControl = "VIEW_ONLY"
HandlesViewOnly boolOptional
Polls PresetReplacePresetByIDResponseDataPermissionsPolls

Poll permissions

CanCreate bool

Can create polls

CanView bool

Can view polls

CanVote bool

Can vote on polls

RecorderType PresetReplacePresetByIDResponseDataPermissionsRecorderType

Type of the recording peer

One of the following:
const PresetReplacePresetByIDResponseDataPermissionsRecorderTypeRecorder PresetReplacePresetByIDResponseDataPermissionsRecorderType = "RECORDER"
const PresetReplacePresetByIDResponseDataPermissionsRecorderTypeLivestreamer PresetReplacePresetByIDResponseDataPermissionsRecorderType = "LIVESTREAMER"
const PresetReplacePresetByIDResponseDataPermissionsRecorderTypeNone PresetReplacePresetByIDResponseDataPermissionsRecorderType = "NONE"
ShowParticipantList bool
WaitingRoomType PresetReplacePresetByIDResponseDataPermissionsWaitingRoomType

Waiting room type

One of the following:
const PresetReplacePresetByIDResponseDataPermissionsWaitingRoomTypeSkip PresetReplacePresetByIDResponseDataPermissionsWaitingRoomType = "SKIP"
const PresetReplacePresetByIDResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetReplacePresetByIDResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"
const PresetReplacePresetByIDResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetReplacePresetByIDResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"
AcceptStageRequests boolOptional
IsRecorder boolOptional
StageAccess PresetReplacePresetByIDResponseDataPermissionsStageAccessOptional
One of the following:
const PresetReplacePresetByIDResponseDataPermissionsStageAccessAllowed PresetReplacePresetByIDResponseDataPermissionsStageAccess = "ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsStageAccessNotAllowed PresetReplacePresetByIDResponseDataPermissionsStageAccess = "NOT_ALLOWED"
const PresetReplacePresetByIDResponseDataPermissionsStageAccessCanRequest PresetReplacePresetByIDResponseDataPermissionsStageAccess = "CAN_REQUEST"
StageEnabled boolOptional
TranscriptionEnabled boolOptional
UI PresetReplacePresetByIDResponseDataUI
DesignTokens PresetReplacePresetByIDResponseDataUIDesignTokens
BorderRadius PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadius
One of the following:
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadiusSharp PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadius = "sharp"
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadiusRounded PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadius = "rounded"
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadiusExtraRounded PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadius = "extra-rounded"
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadiusCircular PresetReplacePresetByIDResponseDataUIDesignTokensBorderRadius = "circular"
BorderWidth PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidth
One of the following:
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidthNone PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidth = "none"
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidthThin PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidth = "thin"
const PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidthFat PresetReplacePresetByIDResponseDataUIDesignTokensBorderWidth = "fat"
Colors PresetReplacePresetByIDResponseDataUIDesignTokensColors
Background PresetReplacePresetByIDResponseDataUIDesignTokensColorsBackground
Number1000 string
Number600 string
Number700 string
Number800 string
Number900 string
Brand PresetReplacePresetByIDResponseDataUIDesignTokensColorsBrand
Number300 string
Number400 string
Number500 string
Number600 string
Number700 string
Danger string
Success string
Text string
TextOnBrand string
VideoBg string
Warning string
SpacingBase float64
minimum1
Theme PresetReplacePresetByIDResponseDataUIDesignTokensTheme
One of the following:
const PresetReplacePresetByIDResponseDataUIDesignTokensThemeDarkest PresetReplacePresetByIDResponseDataUIDesignTokensTheme = "darkest"
const PresetReplacePresetByIDResponseDataUIDesignTokensThemeDark PresetReplacePresetByIDResponseDataUIDesignTokensTheme = "dark"
const PresetReplacePresetByIDResponseDataUIDesignTokensThemeLight PresetReplacePresetByIDResponseDataUIDesignTokensTheme = "light"
FontFamily stringOptional
GoogleFont stringOptional
UpdatedAt Time

Timestamp this preset was last updated

formatdate-time
Success bool

Success status of the operation

Replace a preset

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/realtime_kit"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.RealtimeKit.Presets.ReplacePresetByID(
    context.TODO(),
    "app_id",
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    realtime_kit.PresetReplacePresetByIDParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
      Config: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfig{
        MaxScreenshareCount: cloudflare.F(0.000000),
        MaxVideoStreams: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMaxVideoStreams{
          Desktop: cloudflare.F(0.000000),
          Mobile: cloudflare.F(0.000000),
        }),
        Media: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMedia{
          Screenshare: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMediaScreenshare{
            FrameRate: cloudflare.F(0.000000),
            Quality: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMediaScreenshareQualityHD),
          }),
          Video: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMediaVideo{
            FrameRate: cloudflare.F(30.000000),
            Quality: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigMediaVideoQualityHD),
          }),
        }),
        ViewType: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsConfigViewTypeGroupCall),
      }),
      Name: cloudflare.F("name"),
      Permissions: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissions{
        AcceptWaitingRequests: cloudflare.F(true),
        CanAcceptProductionRequests: cloudflare.F(true),
        CanChangeParticipantPermissions: cloudflare.F(true),
        CanEditDisplayName: cloudflare.F(true),
        CanLivestream: cloudflare.F(true),
        CanRecord: cloudflare.F(true),
        CanSpotlight: cloudflare.F(true),
        Chat: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsChat{
          Private: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsChatPrivate{
            CanReceive: cloudflare.F(true),
            CanSend: cloudflare.F(true),
            Files: cloudflare.F(true),
            Text: cloudflare.F(true),
          }),
          Public: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsChatPublic{
            CanSend: cloudflare.F(true),
            Files: cloudflare.F(true),
            Text: cloudflare.F(true),
          }),
        }),
        ConnectedMeetings: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsConnectedMeetings{
          CanAlterConnectedMeetings: cloudflare.F(true),
          CanSwitchConnectedMeetings: cloudflare.F(true),
          CanSwitchToParentMeeting: cloudflare.F(true),
        }),
        DisableParticipantAudio: cloudflare.F(true),
        DisableParticipantScreensharing: cloudflare.F(true),
        DisableParticipantVideo: cloudflare.F(true),
        HiddenParticipant: cloudflare.F(true),
        KickParticipant: cloudflare.F(true),
        Media: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMedia{
          Audio: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaAudio{
            CanProduce: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaAudioCanProduceAllowed),
          }),
          Screenshare: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaScreenshare{
            CanProduce: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaScreenshareCanProduceAllowed),
          }),
          Video: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaVideo{
            CanProduce: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsMediaVideoCanProduceAllowed),
          }),
        }),
        PinParticipant: cloudflare.F(true),
        Plugins: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsPlugins{
          CanClose: cloudflare.F(true),
          CanEditConfig: cloudflare.F(true),
          CanStart: cloudflare.F(true),
          Config: cloudflare.F(map[string]realtime_kit.PresetReplacePresetByIDParamsPermissionsPluginsConfig{
          "foo": realtime_kit.PresetReplacePresetByIDParamsPermissionsPluginsConfig{

          },
          }),
        }),
        Polls: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsPolls{
          CanCreate: cloudflare.F(true),
          CanView: cloudflare.F(true),
          CanVote: cloudflare.F(true),
        }),
        RecorderType: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsRecorderTypeRecorder),
        ShowParticipantList: cloudflare.F(true),
        WaitingRoomType: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsPermissionsWaitingRoomTypeSkip),
      }),
      UI: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUI{
        DesignTokens: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokens{
          BorderRadius: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensBorderRadiusSharp),
          BorderWidth: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensBorderWidthNone),
          Colors: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensColors{
            Background: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensColorsBackground{
              Number600: cloudflare.F("600"),
              Number700: cloudflare.F("700"),
              Number800: cloudflare.F("800"),
              Number900: cloudflare.F("900"),
              Number1000: cloudflare.F("1000"),
            }),
            Brand: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensColorsBrand{
              Number300: cloudflare.F("300"),
              Number400: cloudflare.F("400"),
              Number500: cloudflare.F("500"),
              Number600: cloudflare.F("600"),
              Number700: cloudflare.F("700"),
            }),
            Danger: cloudflare.F("danger"),
            Success: cloudflare.F("success"),
            Text: cloudflare.F("text"),
            TextOnBrand: cloudflare.F("text_on_brand"),
            VideoBg: cloudflare.F("video_bg"),
            Warning: cloudflare.F("warning"),
          }),
          SpacingBase: cloudflare.F(1.000000),
          Theme: cloudflare.F(realtime_kit.PresetReplacePresetByIDParamsUIDesignTokensThemeDarkest),
        }),
      }),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.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",
          "simulcast": true
        },
        "audio": {
          "enable_high_bitrate": true,
          "enable_stereo": true
        }
      },
      "view_type": "GROUP_CALL",
      "livestream_viewer_qualities": [
        0
      ]
    },
    "created_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "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": {
          "foo": {
            "access_control": "FULL_ACCESS",
            "handles_view_only": true
          }
        }
      },
      "polls": {
        "can_create": true,
        "can_view": true,
        "can_vote": true
      },
      "recorder_type": "RECORDER",
      "show_participant_list": true,
      "waiting_room_type": "SKIP",
      "accept_stage_requests": true,
      "is_recorder": true,
      "stage_access": "ALLOWED",
      "stage_enabled": true,
      "transcription_enabled": true
    },
    "ui": {
      "design_tokens": {
        "border_radius": "sharp",
        "border_width": "none",
        "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"
        },
        "spacing_base": 1,
        "theme": "darkest",
        "font_family": "font_family",
        "google_font": "google_font",
        "logo": "https://example.com"
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "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",
          "simulcast": true
        },
        "audio": {
          "enable_high_bitrate": true,
          "enable_stereo": true
        }
      },
      "view_type": "GROUP_CALL",
      "livestream_viewer_qualities": [
        0
      ]
    },
    "created_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "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": {
          "foo": {
            "access_control": "FULL_ACCESS",
            "handles_view_only": true
          }
        }
      },
      "polls": {
        "can_create": true,
        "can_view": true,
        "can_vote": true
      },
      "recorder_type": "RECORDER",
      "show_participant_list": true,
      "waiting_room_type": "SKIP",
      "accept_stage_requests": true,
      "is_recorder": true,
      "stage_access": "ALLOWED",
      "stage_enabled": true,
      "transcription_enabled": true
    },
    "ui": {
      "design_tokens": {
        "border_radius": "sharp",
        "border_width": "none",
        "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"
        },
        "spacing_base": 1,
        "theme": "darkest",
        "font_family": "font_family",
        "google_font": "google_font",
        "logo": "https://example.com"
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "success": true
}