Class: ElevenlabsClient::Admin::Webhooks

Inherits:
Object
  • Object
show all
Defined in:
lib/elevenlabs_client/endpoints/admin/webhooks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Webhooks

Returns a new instance of Webhooks.



6
7
8
# File 'lib/elevenlabs_client/endpoints/admin/webhooks.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#list_webhooks(include_usages: nil) ⇒ Hash Also known as: get_webhooks, all, webhooks

GET /v1/workspace/webhooks List workspace webhooks Documentation: https://elevenlabs.io/docs/api-reference/workspace/list-workspace-webhooks

Parameters:

  • include_usages (Boolean) (defaults to: nil)

    Whether to include active usages of the webhook, only usable by admins. Defaults to false.

Returns:

  • (Hash)

    The JSON response containing all webhooks for the workspace.



16
17
18
19
20
21
22
# File 'lib/elevenlabs_client/endpoints/admin/webhooks.rb', line 16

def list_webhooks(include_usages: nil)
  endpoint = "/v1/workspace/webhooks"
  params = {
    include_usages: include_usages
  }.compact
  @client.get(endpoint, params)
end