# Webhooks ## Fetch all webhooks details `client.RealtimeKit.Webhooks.GetWebhooks(ctx, appID, query) (*WebhookGetWebhooksResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Returns details of all webhooks for an App. ### Parameters - `appID string` The app identifier tag. - `query WebhookGetWebhooksParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookGetWebhooksResponse struct{…}` - `Data []WebhookGetWebhooksResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookGetWebhooksResponseDataEvent` Events this webhook will send updates for - `const WebhookGetWebhooksResponseDataEventMeetingStarted WebhookGetWebhooksResponseDataEvent = "meeting.started"` - `const WebhookGetWebhooksResponseDataEventMeetingEnded WebhookGetWebhooksResponseDataEvent = "meeting.ended"` - `const WebhookGetWebhooksResponseDataEventMeetingParticipantJoined WebhookGetWebhooksResponseDataEvent = "meeting.participantJoined"` - `const WebhookGetWebhooksResponseDataEventMeetingParticipantLeft WebhookGetWebhooksResponseDataEvent = "meeting.participantLeft"` - `const WebhookGetWebhooksResponseDataEventMeetingChatSynced WebhookGetWebhooksResponseDataEvent = "meeting.chatSynced"` - `const WebhookGetWebhooksResponseDataEventRecordingStatusUpdate WebhookGetWebhooksResponseDataEvent = "recording.statusUpdate"` - `const WebhookGetWebhooksResponseDataEventLivestreamingStatusUpdate WebhookGetWebhooksResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookGetWebhooksResponseDataEventMeetingTranscript WebhookGetWebhooksResponseDataEvent = "meeting.transcript"` - `const WebhookGetWebhooksResponseDataEventMeetingSummary WebhookGetWebhooksResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.GetWebhooks( context.TODO(), "app_id", realtime_kit.WebhookGetWebhooksParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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.NewWebhook(ctx, appID, params) (*WebhookNewWebhookResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Adds a new webhook to an App. ### Parameters - `appID string` The app identifier tag. - `params WebhookNewWebhookParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Events param.Field[[]WebhookNewWebhookParamsEvent]` Body param: Events that this webhook will get triggered by - `const WebhookNewWebhookParamsEventMeetingStarted WebhookNewWebhookParamsEvent = "meeting.started"` - `const WebhookNewWebhookParamsEventMeetingEnded WebhookNewWebhookParamsEvent = "meeting.ended"` - `const WebhookNewWebhookParamsEventMeetingParticipantJoined WebhookNewWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookNewWebhookParamsEventMeetingParticipantLeft WebhookNewWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookNewWebhookParamsEventMeetingChatSynced WebhookNewWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookNewWebhookParamsEventRecordingStatusUpdate WebhookNewWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookNewWebhookParamsEventLivestreamingStatusUpdate WebhookNewWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookNewWebhookParamsEventMeetingTranscript WebhookNewWebhookParamsEvent = "meeting.transcript"` - `const WebhookNewWebhookParamsEventMeetingSummary WebhookNewWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL this webhook will send events to - `Enabled param.Field[bool]` Body param: Set whether or not the webhook should be active when created ### Returns - `type WebhookNewWebhookResponse struct{…}` - `Data WebhookNewWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookNewWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookNewWebhookResponseDataEventMeetingStarted WebhookNewWebhookResponseDataEvent = "meeting.started"` - `const WebhookNewWebhookResponseDataEventMeetingEnded WebhookNewWebhookResponseDataEvent = "meeting.ended"` - `const WebhookNewWebhookResponseDataEventMeetingParticipantJoined WebhookNewWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookNewWebhookResponseDataEventMeetingParticipantLeft WebhookNewWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookNewWebhookResponseDataEventMeetingChatSynced WebhookNewWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookNewWebhookResponseDataEventRecordingStatusUpdate WebhookNewWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookNewWebhookResponseDataEventLivestreamingStatusUpdate WebhookNewWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookNewWebhookResponseDataEventMeetingTranscript WebhookNewWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookNewWebhookResponseDataEventMeetingSummary WebhookNewWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.NewWebhook( context.TODO(), "app_id", realtime_kit.WebhookNewWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Events: cloudflare.F([]realtime_kit.WebhookNewWebhookParamsEvent{realtime_kit.WebhookNewWebhookParamsEventMeetingStarted, realtime_kit.WebhookNewWebhookParamsEventMeetingEnded, realtime_kit.WebhookNewWebhookParamsEventMeetingParticipantJoined, realtime_kit.WebhookNewWebhookParamsEventMeetingParticipantLeft, realtime_kit.WebhookNewWebhookParamsEventMeetingChatSynced, realtime_kit.WebhookNewWebhookParamsEventRecordingStatusUpdate, realtime_kit.WebhookNewWebhookParamsEventLivestreamingStatusUpdate, realtime_kit.WebhookNewWebhookParamsEventMeetingTranscript, realtime_kit.WebhookNewWebhookParamsEventMeetingSummary}), Name: cloudflare.F("All events webhook"), URL: cloudflare.F("https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, webhookID, query) (*WebhookGetWebhookByIDResponse, error)` **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` - `query WebhookGetWebhookByIDParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookGetWebhookByIDResponse struct{…}` - `Data WebhookGetWebhookByIDResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookGetWebhookByIDResponseDataEvent` Events this webhook will send updates for - `const WebhookGetWebhookByIDResponseDataEventMeetingStarted WebhookGetWebhookByIDResponseDataEvent = "meeting.started"` - `const WebhookGetWebhookByIDResponseDataEventMeetingEnded WebhookGetWebhookByIDResponseDataEvent = "meeting.ended"` - `const WebhookGetWebhookByIDResponseDataEventMeetingParticipantJoined WebhookGetWebhookByIDResponseDataEvent = "meeting.participantJoined"` - `const WebhookGetWebhookByIDResponseDataEventMeetingParticipantLeft WebhookGetWebhookByIDResponseDataEvent = "meeting.participantLeft"` - `const WebhookGetWebhookByIDResponseDataEventMeetingChatSynced WebhookGetWebhookByIDResponseDataEvent = "meeting.chatSynced"` - `const WebhookGetWebhookByIDResponseDataEventRecordingStatusUpdate WebhookGetWebhookByIDResponseDataEvent = "recording.statusUpdate"` - `const WebhookGetWebhookByIDResponseDataEventLivestreamingStatusUpdate WebhookGetWebhookByIDResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookGetWebhookByIDResponseDataEventMeetingTranscript WebhookGetWebhookByIDResponseDataEvent = "meeting.transcript"` - `const WebhookGetWebhookByIDResponseDataEventMeetingSummary WebhookGetWebhookByIDResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.GetWebhookByID( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookGetWebhookByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, webhookID, params) (*WebhookReplaceWebhookResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Events param.Field[[]WebhookReplaceWebhookParamsEvent]` Body param: Events that this webhook will get triggered by - `const WebhookReplaceWebhookParamsEventMeetingStarted WebhookReplaceWebhookParamsEvent = "meeting.started"` - `const WebhookReplaceWebhookParamsEventMeetingEnded WebhookReplaceWebhookParamsEvent = "meeting.ended"` - `const WebhookReplaceWebhookParamsEventMeetingParticipantJoined WebhookReplaceWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookReplaceWebhookParamsEventMeetingParticipantLeft WebhookReplaceWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookReplaceWebhookParamsEventMeetingChatSynced WebhookReplaceWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookReplaceWebhookParamsEventRecordingStatusUpdate WebhookReplaceWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookReplaceWebhookParamsEventLivestreamingStatusUpdate WebhookReplaceWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookReplaceWebhookParamsEventMeetingTranscript WebhookReplaceWebhookParamsEvent = "meeting.transcript"` - `const WebhookReplaceWebhookParamsEventMeetingSummary WebhookReplaceWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL this webhook will send events to - `Enabled param.Field[bool]` Body param: Set whether or not the webhook should be active when created ### Returns - `type WebhookReplaceWebhookResponse struct{…}` - `Data WebhookReplaceWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookReplaceWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookReplaceWebhookResponseDataEventMeetingStarted WebhookReplaceWebhookResponseDataEvent = "meeting.started"` - `const WebhookReplaceWebhookResponseDataEventMeetingEnded WebhookReplaceWebhookResponseDataEvent = "meeting.ended"` - `const WebhookReplaceWebhookResponseDataEventMeetingParticipantJoined WebhookReplaceWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookReplaceWebhookResponseDataEventMeetingParticipantLeft WebhookReplaceWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookReplaceWebhookResponseDataEventMeetingChatSynced WebhookReplaceWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookReplaceWebhookResponseDataEventRecordingStatusUpdate WebhookReplaceWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookReplaceWebhookResponseDataEventLivestreamingStatusUpdate WebhookReplaceWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookReplaceWebhookResponseDataEventMeetingTranscript WebhookReplaceWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookReplaceWebhookResponseDataEventMeetingSummary WebhookReplaceWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.ReplaceWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookReplaceWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Events: cloudflare.F([]realtime_kit.WebhookReplaceWebhookParamsEvent{realtime_kit.WebhookReplaceWebhookParamsEventMeetingStarted, realtime_kit.WebhookReplaceWebhookParamsEventMeetingEnded, realtime_kit.WebhookReplaceWebhookParamsEventMeetingParticipantJoined, realtime_kit.WebhookReplaceWebhookParamsEventMeetingParticipantLeft, realtime_kit.WebhookReplaceWebhookParamsEventMeetingChatSynced, realtime_kit.WebhookReplaceWebhookParamsEventRecordingStatusUpdate, realtime_kit.WebhookReplaceWebhookParamsEventLivestreamingStatusUpdate, realtime_kit.WebhookReplaceWebhookParamsEventMeetingTranscript, realtime_kit.WebhookReplaceWebhookParamsEventMeetingSummary}), Name: cloudflare.F("All events webhook"), URL: cloudflare.F("https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, webhookID, params) (*WebhookEditWebhookResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Enabled param.Field[bool]` Body param - `Events param.Field[[]WebhookEditWebhookParamsEvent]` Body param: Events that the webhook will get triggered by - `const WebhookEditWebhookParamsEventMeetingStarted WebhookEditWebhookParamsEvent = "meeting.started"` - `const WebhookEditWebhookParamsEventMeetingEnded WebhookEditWebhookParamsEvent = "meeting.ended"` - `const WebhookEditWebhookParamsEventMeetingParticipantJoined WebhookEditWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookEditWebhookParamsEventMeetingParticipantLeft WebhookEditWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookEditWebhookParamsEventRecordingStatusUpdate WebhookEditWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookEditWebhookParamsEventLivestreamingStatusUpdate WebhookEditWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookEditWebhookParamsEventMeetingChatSynced WebhookEditWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookEditWebhookParamsEventMeetingTranscript WebhookEditWebhookParamsEvent = "meeting.transcript"` - `const WebhookEditWebhookParamsEventMeetingSummary WebhookEditWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL the webhook will send events to ### Returns - `type WebhookEditWebhookResponse struct{…}` - `Data WebhookEditWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookEditWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookEditWebhookResponseDataEventMeetingStarted WebhookEditWebhookResponseDataEvent = "meeting.started"` - `const WebhookEditWebhookResponseDataEventMeetingEnded WebhookEditWebhookResponseDataEvent = "meeting.ended"` - `const WebhookEditWebhookResponseDataEventMeetingParticipantJoined WebhookEditWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookEditWebhookResponseDataEventMeetingParticipantLeft WebhookEditWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookEditWebhookResponseDataEventMeetingChatSynced WebhookEditWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookEditWebhookResponseDataEventRecordingStatusUpdate WebhookEditWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookEditWebhookResponseDataEventLivestreamingStatusUpdate WebhookEditWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookEditWebhookResponseDataEventMeetingTranscript WebhookEditWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookEditWebhookResponseDataEventMeetingSummary WebhookEditWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.EditWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookEditWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, webhookID, body) (*WebhookDeleteWebhookResponse, error)` **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` - `body WebhookDeleteWebhookParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookDeleteWebhookResponse struct{…}` - `Data WebhookDeleteWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookDeleteWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookDeleteWebhookResponseDataEventMeetingStarted WebhookDeleteWebhookResponseDataEvent = "meeting.started"` - `const WebhookDeleteWebhookResponseDataEventMeetingEnded WebhookDeleteWebhookResponseDataEvent = "meeting.ended"` - `const WebhookDeleteWebhookResponseDataEventMeetingParticipantJoined WebhookDeleteWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookDeleteWebhookResponseDataEventMeetingParticipantLeft WebhookDeleteWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookDeleteWebhookResponseDataEventMeetingChatSynced WebhookDeleteWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookDeleteWebhookResponseDataEventRecordingStatusUpdate WebhookDeleteWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookDeleteWebhookResponseDataEventLivestreamingStatusUpdate WebhookDeleteWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookDeleteWebhookResponseDataEventMeetingTranscript WebhookDeleteWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookDeleteWebhookResponseDataEventMeetingSummary WebhookDeleteWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `Success bool` ### Example ```go 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.Webhooks.DeleteWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookDeleteWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 } ```