Skip to content
Start here

Delete a preset

client.RealtimeKit.Presets.Delete(ctx, appID, presetID, body) (*PresetDeleteResponse, error)
DELETE/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}

Deletes a 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
body PresetDeleteParams
AccountID param.Field[string]

The account identifier tag.

maxLength32
ReturnsExpand Collapse
type PresetDeleteResponse struct{…}
Data PresetDeleteResponseData

Data returned by the operation

ID string

ID of the preset

formatuuid
Config PresetDeleteResponseDataConfig
MaxScreenshareCount int64

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

MaxVideoStreams PresetDeleteResponseDataConfigMaxVideoStreams

Maximum number of streams that are visible on a device

Desktop int64

Maximum number of video streams visible on desktop devices

Mobile int64

Maximum number of streams visible on mobile devices

Media PresetDeleteResponseDataConfigMedia

Media configuration options. eg: Video quality

Screenshare PresetDeleteResponseDataConfigMediaScreenshare

Configuration options for participant screen shares

FrameRate int64

Frame rate of screen share

Quality PresetDeleteResponseDataConfigMediaScreenshareQuality

Quality of screen share

One of the following:
const PresetDeleteResponseDataConfigMediaScreenshareQualityHD PresetDeleteResponseDataConfigMediaScreenshareQuality = "hd"
const PresetDeleteResponseDataConfigMediaScreenshareQualityVga PresetDeleteResponseDataConfigMediaScreenshareQuality = "vga"
const PresetDeleteResponseDataConfigMediaScreenshareQualityQvga PresetDeleteResponseDataConfigMediaScreenshareQuality = "qvga"
Video PresetDeleteResponseDataConfigMediaVideo

Configuration options for participant videos

FrameRate int64

Frame rate of participants' video

maximum30
Quality PresetDeleteResponseDataConfigMediaVideoQuality

Video quality of participants

One of the following:
const PresetDeleteResponseDataConfigMediaVideoQualityHD PresetDeleteResponseDataConfigMediaVideoQuality = "hd"
const PresetDeleteResponseDataConfigMediaVideoQualityVga PresetDeleteResponseDataConfigMediaVideoQuality = "vga"
const PresetDeleteResponseDataConfigMediaVideoQualityQvga PresetDeleteResponseDataConfigMediaVideoQuality = "qvga"
Audio PresetDeleteResponseDataConfigMediaAudiooptional

Control options for Audio quality.

EnableHighBitrate booloptional

Enable High Quality Audio for your meetings

EnableStereo booloptional

Enable Stereo for your meetings

ViewType PresetDeleteResponseDataConfigViewType

Type of the meeting

One of the following:
const PresetDeleteResponseDataConfigViewTypeGroupCall PresetDeleteResponseDataConfigViewType = "GROUP_CALL"
const PresetDeleteResponseDataConfigViewTypeWebinar PresetDeleteResponseDataConfigViewType = "WEBINAR"
const PresetDeleteResponseDataConfigViewTypeAudioRoom PresetDeleteResponseDataConfigViewType = "AUDIO_ROOM"
Name string

Name of the preset

UI PresetDeleteResponseDataUI
DesignTokens PresetDeleteResponseDataUIDesignTokens
BorderRadius PresetDeleteResponseDataUIDesignTokensBorderRadius
BorderWidth PresetDeleteResponseDataUIDesignTokensBorderWidth
Colors PresetDeleteResponseDataUIDesignTokensColors
Background PresetDeleteResponseDataUIDesignTokensColorsBackground
Number1000 string
Number600 string
Number700 string
Number800 string
Number900 string
Brand PresetDeleteResponseDataUIDesignTokensColorsBrand
Number300 string
Number400 string
Number500 string
Number600 string
Number700 string
Danger string
Success string
Text string
TextOnBrand string
VideoBg string
Warning string
SpacingBase float64
Theme PresetDeleteResponseDataUIDesignTokensTheme
ConfigDiff unknownoptional
Permissions PresetDeleteResponseDataPermissionsoptional
AcceptWaitingRequests bool

Whether this participant can accept waiting requests

CanAcceptProductionRequests bool
CanChangeParticipantPermissions bool
CanEditDisplayName bool
CanLivestream bool
CanRecord bool
CanSpotlight bool
Chat PresetDeleteResponseDataPermissionsChat

Chat permissions

Private PresetDeleteResponseDataPermissionsChatPrivate
CanReceive bool
CanSend bool
Files bool
Text bool
Public PresetDeleteResponseDataPermissionsChatPublic
CanSend bool

Can send messages in general

Files bool

Can send file messages

Text bool

Can send text messages

ConnectedMeetings PresetDeleteResponseDataPermissionsConnectedMeetings
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 PresetDeleteResponseDataPermissionsMedia

Media permissions

Audio PresetDeleteResponseDataPermissionsMediaAudio

Audio permissions

CanProduce PresetDeleteResponseDataPermissionsMediaAudioCanProduce

Can produce audio

One of the following:
const PresetDeleteResponseDataPermissionsMediaAudioCanProduceAllowed PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"
const PresetDeleteResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"
const PresetDeleteResponseDataPermissionsMediaAudioCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"
Screenshare PresetDeleteResponseDataPermissionsMediaScreenshare

Screenshare permissions

CanProduce PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce

Can produce screen share video

One of the following:
const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"
const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"
const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"
Video PresetDeleteResponseDataPermissionsMediaVideo

Video permissions

CanProduce PresetDeleteResponseDataPermissionsMediaVideoCanProduce

Can produce video

One of the following:
const PresetDeleteResponseDataPermissionsMediaVideoCanProduceAllowed PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"
const PresetDeleteResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"
const PresetDeleteResponseDataPermissionsMediaVideoCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"
PinParticipant bool
Plugins PresetDeleteResponseDataPermissionsPlugins

Plugin permissions

CanClose bool

Can close plugins that are already open

CanEditConfig bool

Can edit plugin config

CanStart bool

Can start plugins

Config PresetDeleteResponseDataPermissionsPluginsConfigUnion
One of the following:
UnionString
type PresetDeleteResponseDataPermissionsPluginsConfigObject struct{…}
AccessControl PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl
One of the following:
const PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControlFullAccess PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"
const PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControlViewOnly PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"
HandlesViewOnly bool
Polls PresetDeleteResponseDataPermissionsPolls

Poll permissions

CanCreate bool

Can create polls

CanView bool

Can view polls

CanVote bool

Can vote on polls

RecorderType PresetDeleteResponseDataPermissionsRecorderType

Type of the recording peer

One of the following:
const PresetDeleteResponseDataPermissionsRecorderTypeRecorder PresetDeleteResponseDataPermissionsRecorderType = "RECORDER"
const PresetDeleteResponseDataPermissionsRecorderTypeLivestreamer PresetDeleteResponseDataPermissionsRecorderType = "LIVESTREAMER"
const PresetDeleteResponseDataPermissionsRecorderTypeNone PresetDeleteResponseDataPermissionsRecorderType = "NONE"
ShowParticipantList bool
WaitingRoomType PresetDeleteResponseDataPermissionsWaitingRoomType

Waiting room type

One of the following:
const PresetDeleteResponseDataPermissionsWaitingRoomTypeSkip PresetDeleteResponseDataPermissionsWaitingRoomType = "SKIP"
const PresetDeleteResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetDeleteResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"
const PresetDeleteResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetDeleteResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"
IsRecorder booloptional
Success bool

Success status of the operation

Delete 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"),
  )
  preset, err := client.RealtimeKit.Presets.Delete(
    context.TODO(),
    "app_id",
    "preset_id",
    realtime_kit.PresetDeleteParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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
}