---
title: Add a webhook
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Realtime Kit](https://developers.cloudflare.com/api/go/resources/realtime_kit)

[Webhooks](https://developers.cloudflare.com/api/go/resources/realtime_kit/subresources/webhooks)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Add a webhook

client.RealtimeKit.Webhooks.NewWebhook(ctx, appID, params) (\*[WebhookNewWebhookResponse](<https://developers.cloudflare.com/api/go/resources/realtime_kit#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/realtime/kit/{app\_id}/webhooks

Adds a new webhook to an App.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

##### Accepted Permissions (at least one required)

`Realtime Admin``Realtime`

##### ParametersExpand Collapse

appID string

The app identifier tag.

[Link to this property](<#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20app_id%20%3E%20(schema)>)

<details>

<summary>

params WebhookNewWebhookParams

</summary>

AccountID param.Field\[string]

Path param: The account identifier tag.

maxLength32

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

<details>

<summary>

Events param.Field\[\[]WebhookNewWebhookParamsEvent]

Body param: Events that this webhook will get triggered by

</summary>

const WebhookNewWebhookParamsEventMeetingStarted WebhookNewWebhookParamsEvent = "meeting.started"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingEnded WebhookNewWebhookParamsEvent = "meeting.ended"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingParticipantJoined WebhookNewWebhookParamsEvent = "meeting.participantJoined"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingParticipantLeft WebhookNewWebhookParamsEvent = "meeting.participantLeft"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingChatSynced WebhookNewWebhookParamsEvent = "meeting.chatSynced"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

const WebhookNewWebhookParamsEventRecordingStatusUpdate WebhookNewWebhookParamsEvent = "recording.statusUpdate"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

const WebhookNewWebhookParamsEventLivestreamingStatusUpdate WebhookNewWebhookParamsEvent = "livestreaming.statusUpdate"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingTranscript WebhookNewWebhookParamsEvent = "meeting.transcript"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%207">Link to this property</a>

const WebhookNewWebhookParamsEventMeetingSummary WebhookNewWebhookParamsEvent = "meeting.summary"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%208">Link to this property</a>

</details>

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20events">Link to this property</a>

Name param.Field\[string]

Body param: Name of the webhook

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20name">Link to this property</a>

URL param.Field\[string]

Body param: URL this webhook will send events to

formaturi

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20url">Link to this property</a>

Enabled param.Field\[bool]Optional

Body param: Set whether or not the webhook should be active when created

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default%20%3E%20(param)%20enabled">Link to this property</a>

</details>

[Link to this property](<#(resource)%20realtime_kit.webhooks%20%3E%20(method)%20create_webhook%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type WebhookNewWebhookResponse struct{…}

</summary>

<details>

<summary>

Data WebhookNewWebhookResponseData

</summary>

ID string

ID of the webhook

formatuuid

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

Timestamp when this webhook was created

formatdate-time

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20created_at">Link to this property</a>

Enabled bool

Set to true if the webhook is active

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

Events \[]WebhookNewWebhookResponseDataEvent

Events this webhook will send updates for

</summary>

One of the following:

const WebhookNewWebhookResponseDataEventMeetingStarted WebhookNewWebhookResponseDataEvent = "meeting.started"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingEnded WebhookNewWebhookResponseDataEvent = "meeting.ended"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingParticipantJoined WebhookNewWebhookResponseDataEvent = "meeting.participantJoined"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingParticipantLeft WebhookNewWebhookResponseDataEvent = "meeting.participantLeft"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingChatSynced WebhookNewWebhookResponseDataEvent = "meeting.chatSynced"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

const WebhookNewWebhookResponseDataEventRecordingStatusUpdate WebhookNewWebhookResponseDataEvent = "recording.statusUpdate"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

const WebhookNewWebhookResponseDataEventLivestreamingStatusUpdate WebhookNewWebhookResponseDataEvent = "livestreaming.statusUpdate"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingTranscript WebhookNewWebhookResponseDataEvent = "meeting.transcript"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%207">Link to this property</a>

const WebhookNewWebhookResponseDataEventMeetingSummary WebhookNewWebhookResponseDataEvent = "meeting.summary"

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events%20%3E%20(items)%20%3E%20(member)%208">Link to this property</a>

</details>

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20events">Link to this property</a>

Name string

Name of the webhook

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20name">Link to this property</a>

UpdatedAt Time

Timestamp when this webhook was updated

formatdate-time

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20updated_at">Link to this property</a>

URL string

URL the webhook will send events to

formaturi

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

Success bool

<a href="#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20realtime_kit.webhooks%20%3E%20(model)%20WebhookNewWebhookResponse%20%3E%20(schema)>)

### Add a webhook

Go

HTTPTypeScriptPythonGoTerraform

```
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(),
    "14a396e7-ca44-4937-bf1f-050a69118543",
    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)
}
```

200 example

401 example

```
{
  "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
}
```

```
"{\n  message: \"Unauthorized\"\n}\n"
```

##### Returns Examples

200 example

401 example

```
{
  "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
}
```

```
"{\n  message: \"Unauthorized\"\n}\n"
```