# Webhooks ## Fetch all webhooks details `realtime_kit.webhooks.get_webhooks(strapp_id, WebhookGetWebhooksParams**kwargs) -> WebhookGetWebhooksResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Returns details of all webhooks for an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. ### Returns - `class WebhookGetWebhooksResponse: …` - `data: List[Data]` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.get_webhooks( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(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 `realtime_kit.webhooks.create_webhook(strapp_id, WebhookCreateWebhookParams**kwargs) -> WebhookCreateWebhookResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Adds a new webhook to an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `url: str` URL this webhook will send events to - `enabled: Optional[bool]` Set whether or not the webhook should be active when created ### Returns - `class WebhookCreateWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.create_webhook( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", events=["meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary"], name="All events webhook", url="https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e", ) print(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 `realtime_kit.webhooks.get_webhook_by_id(strwebhook_id, WebhookGetWebhookByIDParams**kwargs) -> WebhookGetWebhookByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Returns webhook details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` ### Returns - `class WebhookGetWebhookByIDResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.get_webhook_by_id( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.webhooks.replace_webhook(strwebhook_id, WebhookReplaceWebhookParams**kwargs) -> WebhookReplaceWebhookResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Replace all details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `url: str` URL this webhook will send events to - `enabled: Optional[bool]` Set whether or not the webhook should be active when created ### Returns - `class WebhookReplaceWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.replace_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", events=["meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary"], name="All events webhook", url="https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e", ) print(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 `realtime_kit.webhooks.edit_webhook(strwebhook_id, WebhookEditWebhookParams**kwargs) -> WebhookEditWebhookResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Edits the webhook details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` - `enabled: Optional[bool]` - `events: Optional[List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]]` Events that the webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.chatSynced"` - `"meeting.transcript"` - `"meeting.summary"` - `name: Optional[str]` Name of the webhook - `url: Optional[str]` URL the webhook will send events to ### Returns - `class WebhookEditWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.edit_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.webhooks.delete_webhook(strwebhook_id, WebhookDeleteWebhookParams**kwargs) -> WebhookDeleteWebhookResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Removes a webhook for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` ### Returns - `class WebhookDeleteWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.delete_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 } ``` ## Domain Types ### Webhook Get Webhooks Response - `class WebhookGetWebhooksResponse: …` - `data: List[Data]` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Create Webhook Response - `class WebhookCreateWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Get Webhook By ID Response - `class WebhookGetWebhookByIDResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Replace Webhook Response - `class WebhookReplaceWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Edit Webhook Response - `class WebhookEditWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Delete Webhook Response - `class WebhookDeleteWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool`