Class: ElevenlabsClient::Endpoints::AgentsPlatform::BatchCalling
- Inherits:
-
Object
- Object
- ElevenlabsClient::Endpoints::AgentsPlatform::BatchCalling
- Defined in:
- lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb
Instance Method Summary collapse
-
#cancel(batch_id) ⇒ Hash
POST /v1/convai/batch-calling/batch_id/cancel Cancel a running batch call and set all recipients to cancelled status Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/cancel.
-
#get(batch_id) ⇒ Hash
GET /v1/convai/batch-calling/batch_id Get detailed information about a batch call including all recipients Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/get.
-
#initialize(client) ⇒ BatchCalling
constructor
A new instance of BatchCalling.
-
#list(**options) ⇒ Hash
GET /v1/convai/batch-calling/workspace Get all batch calls for the current workspace Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/list.
-
#retry(batch_id) ⇒ Hash
POST /v1/convai/batch-calling/batch_id/retry Retry a batch call, calling failed and no-response recipients again Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/retry.
-
#submit(call_name:, agent_id:, agent_phone_number_id:, scheduled_time_unix:, recipients:) ⇒ Hash
POST /v1/convai/batch-calling/submit Submit a batch call request to schedule calls for multiple recipients Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/submit.
Constructor Details
#initialize(client) ⇒ BatchCalling
Returns a new instance of BatchCalling.
7 8 9 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#cancel(batch_id) ⇒ Hash
POST /v1/convai/batch-calling/batch_id/cancel Cancel a running batch call and set all recipients to cancelled status Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/cancel
71 72 73 74 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 71 def cancel(batch_id) endpoint = "/v1/convai/batch-calling/#{batch_id}/cancel" @client.post(endpoint, {}) end |
#get(batch_id) ⇒ Hash
GET /v1/convai/batch-calling/batch_id Get detailed information about a batch call including all recipients Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/get
60 61 62 63 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 60 def get(batch_id) endpoint = "/v1/convai/batch-calling/#{batch_id}" @client.get(endpoint) end |
#list(**options) ⇒ Hash
GET /v1/convai/batch-calling/workspace Get all batch calls for the current workspace Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/list
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 42 def list(**) endpoint = "/v1/convai/batch-calling/workspace" query_params = .compact if query_params.any? query_string = URI.encode_www_form(query_params) endpoint = "#{endpoint}?#{query_string}" end @client.get(endpoint) end |
#retry(batch_id) ⇒ Hash
POST /v1/convai/batch-calling/batch_id/retry Retry a batch call, calling failed and no-response recipients again Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/retry
82 83 84 85 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 82 def retry(batch_id) endpoint = "/v1/convai/batch-calling/#{batch_id}/retry" @client.post(endpoint, {}) end |
#submit(call_name:, agent_id:, agent_phone_number_id:, scheduled_time_unix:, recipients:) ⇒ Hash
POST /v1/convai/batch-calling/submit Submit a batch call request to schedule calls for multiple recipients Documentation: https://elevenlabs.io/docs/api-reference/convai/batch-calling/submit
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb', line 21 def submit(call_name:, agent_id:, agent_phone_number_id:, scheduled_time_unix:, recipients:) endpoint = "/v1/convai/batch-calling/submit" request_body = { call_name: call_name, agent_id: agent_id, agent_phone_number_id: agent_phone_number_id, scheduled_time_unix: scheduled_time_unix, recipients: recipients } @client.post(endpoint, request_body) end |