# This file was auto-generated by Fern from our API Definition. import datetime as dt import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.assistant_overrides import AssistantOverrides from ..types.call import Call from ..types.create_assistant_dto import CreateAssistantDto from ..types.create_customer_dto import CreateCustomerDto from ..types.create_squad_dto import CreateSquadDto from ..types.create_workflow_dto import CreateWorkflowDto from ..types.import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto from ..types.schedule_plan import SchedulePlan from ..types.workflow_overrides import WorkflowOverrides from .raw_client import AsyncRawCallsClient, RawCallsClient from .types.create_call_dto_transport import CreateCallDtoTransport from .types.create_calls_response import CreateCallsResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) class CallsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawCallsClient(client_wrapper=client_wrapper) @property def with_raw_response(self) -> RawCallsClient: """ Retrieves a raw implementation of this client that returns raw responses. Returns ------- RawCallsClient """ return self._raw_client def list( self, *, id: typing.Optional[str] = None, assistant_id: typing.Optional[str] = None, phone_number_id: typing.Optional[str] = None, limit: typing.Optional[float] = None, created_at_gt: typing.Optional[dt.datetime] = None, created_at_lt: typing.Optional[dt.datetime] = None, created_at_ge: typing.Optional[dt.datetime] = None, created_at_le: typing.Optional[dt.datetime] = None, updated_at_gt: typing.Optional[dt.datetime] = None, updated_at_lt: typing.Optional[dt.datetime] = None, updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Call]: """ Returns calls for the authenticated organization. Filter results by call ID, assistant ID, phone number ID, or creation and update timestamps. Parameters ---------- id : typing.Optional[str] This is the unique identifier for the call. assistant_id : typing.Optional[str] This will return calls with the specified assistantId. phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. limit : typing.Optional[float] This is the maximum number of items to return. Defaults to 100. created_at_gt : typing.Optional[dt.datetime] This will return items where the createdAt is greater than the specified value. created_at_lt : typing.Optional[dt.datetime] This will return items where the createdAt is less than the specified value. created_at_ge : typing.Optional[dt.datetime] This will return items where the createdAt is greater than or equal to the specified value. created_at_le : typing.Optional[dt.datetime] This will return items where the createdAt is less than or equal to the specified value. updated_at_gt : typing.Optional[dt.datetime] This will return items where the updatedAt is greater than the specified value. updated_at_lt : typing.Optional[dt.datetime] This will return items where the updatedAt is less than the specified value. updated_at_ge : typing.Optional[dt.datetime] This will return items where the updatedAt is greater than or equal to the specified value. updated_at_le : typing.Optional[dt.datetime] This will return items where the updatedAt is less than or equal to the specified value. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- typing.List[Call] Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.list() """ _response = self._raw_client.list( id=id, assistant_id=assistant_id, phone_number_id=phone_number_id, limit=limit, created_at_gt=created_at_gt, created_at_lt=created_at_lt, created_at_ge=created_at_ge, created_at_le=created_at_le, updated_at_gt=updated_at_gt, updated_at_lt=updated_at_lt, updated_at_ge=updated_at_ge, updated_at_le=updated_at_le, request_options=request_options, ) return _response.data def create( self, *, assistant_version: typing.Optional[str] = OMIT, squad_version: typing.Optional[str] = OMIT, transport: typing.Optional[CreateCallDtoTransport] = OMIT, customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, name: typing.Optional[str] = OMIT, schedule_plan: typing.Optional[SchedulePlan] = OMIT, assistant_id: typing.Optional[str] = OMIT, assistant: typing.Optional[CreateAssistantDto] = OMIT, assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, squad_id: typing.Optional[str] = OMIT, squad: typing.Optional[CreateSquadDto] = OMIT, squad_overrides: typing.Optional[AssistantOverrides] = OMIT, workflow_id: typing.Optional[str] = OMIT, workflow: typing.Optional[CreateWorkflowDto] = OMIT, workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, phone_number_id: typing.Optional[str] = OMIT, phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, customer_id: typing.Optional[str] = OMIT, customer: typing.Optional[CreateCustomerDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateCallsResponse: """ Creates a call using an assistant or squad. The request can reference saved resources or include transient configurations. Parameters ---------- assistant_version : typing.Optional[str] This is the assistant version to use for this call. Supported only with direct `assistantId`. Omit to follow the latest version. squad_version : typing.Optional[str] This is the squad version to use for this call. Supported only with direct `squadId`. Omit to follow the latest version. transport : typing.Optional[CreateCallDtoTransport] This is the transport of the call. customers : typing.Optional[typing.Sequence[CreateCustomerDto]] This is used to issue batch calls to multiple customers. Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. name : typing.Optional[str] This is the name of the call. This is just for your own reference. schedule_plan : typing.Optional[SchedulePlan] This is the schedule plan of the call. assistant_id : typing.Optional[str] This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. To start a call with: - Assistant, use `assistantId` or `assistant` - Squad, use `squadId` or `squad` - Workflow, use `workflowId` or `workflow` assistant : typing.Optional[CreateAssistantDto] This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. To start a call with: - Assistant, use `assistant` - Squad, use `squad` - Workflow, use `workflow` assistant_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `assistant` or `assistantId`'s settings and template variables. squad_id : typing.Optional[str] This is the squad that will be used for the call. To use a transient squad, use `squad` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` squad : typing.Optional[CreateSquadDto] This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` squad_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `squad` or `squadId`'s member settings and template variables. This will apply to all members of the squad. workflow_id : typing.Optional[str] This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` workflow : typing.Optional[CreateWorkflowDto] This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` workflow_overrides : typing.Optional[WorkflowOverrides] These are the overrides for the `workflow` or `workflowId`'s settings and template variables. phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. phone_number : typing.Optional[ImportTwilioPhoneNumberDto] This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. customer_id : typing.Optional[str] This is the customer that will be called. To call a transient customer , use `customer` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. customer : typing.Optional[CreateCustomerDto] This is the customer that will be called. To call an existing customer, use `customerId` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- CreateCallsResponse Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.create() """ _response = self._raw_client.create( assistant_version=assistant_version, squad_version=squad_version, transport=transport, customers=customers, name=name, schedule_plan=schedule_plan, assistant_id=assistant_id, assistant=assistant, assistant_overrides=assistant_overrides, squad_id=squad_id, squad=squad, squad_overrides=squad_overrides, workflow_id=workflow_id, workflow=workflow, workflow_overrides=workflow_overrides, phone_number_id=phone_number_id, phone_number=phone_number, customer_id=customer_id, customer=customer, request_options=request_options, ) return _response.data def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: """ Returns the call identified by its ID, including its status, configuration, and available call data. Parameters ---------- id : str The unique identifier of the call. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.get( id="id", ) """ _response = self._raw_client.get(id, request_options=request_options) return _response.data def delete( self, id: str, *, ids: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Call: """ Deletes the call identified by its ID. Parameters ---------- id : str ids : typing.Optional[typing.Sequence[str]] These are the Call IDs to be bulk deleted. If provided, the call ID if any in the request query will be ignored When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. It may take up to a few hours to complete the bulk delete, and will be asynchronous. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.delete( id="id", ) """ _response = self._raw_client.delete(id, ids=ids, request_options=request_options) return _response.data def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> Call: """ Updates the call identified by its ID. Parameters ---------- id : str The unique identifier of the call. name : typing.Optional[str] This is the name of the call. This is just for your own reference. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.update( id="id", ) """ _response = self._raw_client.update(id, name=name, request_options=request_options) return _response.data def call_artifact_controller_mono_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_mono_recording_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_mono_recording_download( id, request_options=request_options ) return _response.data def call_artifact_controller_stereo_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_stereo_recording_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_stereo_recording_download( id, request_options=request_options ) return _response.data def call_artifact_controller_video_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_video_recording_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_video_recording_download( id, request_options=request_options ) return _response.data def call_artifact_controller_customer_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_customer_recording_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_customer_recording_download( id, request_options=request_options ) return _response.data def call_artifact_controller_assistant_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_assistant_recording_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_assistant_recording_download( id, request_options=request_options ) return _response.data def call_artifact_controller_pcap_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_pcap_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_pcap_download(id, request_options=request_options) return _response.data def call_artifact_controller_call_logs_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.call_artifact_controller_call_logs_download( id="id", ) """ _response = self._raw_client.call_artifact_controller_call_logs_download(id, request_options=request_options) return _response.data class AsyncCallsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawCallsClient(client_wrapper=client_wrapper) @property def with_raw_response(self) -> AsyncRawCallsClient: """ Retrieves a raw implementation of this client that returns raw responses. Returns ------- AsyncRawCallsClient """ return self._raw_client async def list( self, *, id: typing.Optional[str] = None, assistant_id: typing.Optional[str] = None, phone_number_id: typing.Optional[str] = None, limit: typing.Optional[float] = None, created_at_gt: typing.Optional[dt.datetime] = None, created_at_lt: typing.Optional[dt.datetime] = None, created_at_ge: typing.Optional[dt.datetime] = None, created_at_le: typing.Optional[dt.datetime] = None, updated_at_gt: typing.Optional[dt.datetime] = None, updated_at_lt: typing.Optional[dt.datetime] = None, updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Call]: """ Returns calls for the authenticated organization. Filter results by call ID, assistant ID, phone number ID, or creation and update timestamps. Parameters ---------- id : typing.Optional[str] This is the unique identifier for the call. assistant_id : typing.Optional[str] This will return calls with the specified assistantId. phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. limit : typing.Optional[float] This is the maximum number of items to return. Defaults to 100. created_at_gt : typing.Optional[dt.datetime] This will return items where the createdAt is greater than the specified value. created_at_lt : typing.Optional[dt.datetime] This will return items where the createdAt is less than the specified value. created_at_ge : typing.Optional[dt.datetime] This will return items where the createdAt is greater than or equal to the specified value. created_at_le : typing.Optional[dt.datetime] This will return items where the createdAt is less than or equal to the specified value. updated_at_gt : typing.Optional[dt.datetime] This will return items where the updatedAt is greater than the specified value. updated_at_lt : typing.Optional[dt.datetime] This will return items where the updatedAt is less than the specified value. updated_at_ge : typing.Optional[dt.datetime] This will return items where the updatedAt is greater than or equal to the specified value. updated_at_le : typing.Optional[dt.datetime] This will return items where the updatedAt is less than or equal to the specified value. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- typing.List[Call] Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.list() asyncio.run(main()) """ _response = await self._raw_client.list( id=id, assistant_id=assistant_id, phone_number_id=phone_number_id, limit=limit, created_at_gt=created_at_gt, created_at_lt=created_at_lt, created_at_ge=created_at_ge, created_at_le=created_at_le, updated_at_gt=updated_at_gt, updated_at_lt=updated_at_lt, updated_at_ge=updated_at_ge, updated_at_le=updated_at_le, request_options=request_options, ) return _response.data async def create( self, *, assistant_version: typing.Optional[str] = OMIT, squad_version: typing.Optional[str] = OMIT, transport: typing.Optional[CreateCallDtoTransport] = OMIT, customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, name: typing.Optional[str] = OMIT, schedule_plan: typing.Optional[SchedulePlan] = OMIT, assistant_id: typing.Optional[str] = OMIT, assistant: typing.Optional[CreateAssistantDto] = OMIT, assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, squad_id: typing.Optional[str] = OMIT, squad: typing.Optional[CreateSquadDto] = OMIT, squad_overrides: typing.Optional[AssistantOverrides] = OMIT, workflow_id: typing.Optional[str] = OMIT, workflow: typing.Optional[CreateWorkflowDto] = OMIT, workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, phone_number_id: typing.Optional[str] = OMIT, phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, customer_id: typing.Optional[str] = OMIT, customer: typing.Optional[CreateCustomerDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateCallsResponse: """ Creates a call using an assistant or squad. The request can reference saved resources or include transient configurations. Parameters ---------- assistant_version : typing.Optional[str] This is the assistant version to use for this call. Supported only with direct `assistantId`. Omit to follow the latest version. squad_version : typing.Optional[str] This is the squad version to use for this call. Supported only with direct `squadId`. Omit to follow the latest version. transport : typing.Optional[CreateCallDtoTransport] This is the transport of the call. customers : typing.Optional[typing.Sequence[CreateCustomerDto]] This is used to issue batch calls to multiple customers. Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. name : typing.Optional[str] This is the name of the call. This is just for your own reference. schedule_plan : typing.Optional[SchedulePlan] This is the schedule plan of the call. assistant_id : typing.Optional[str] This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. To start a call with: - Assistant, use `assistantId` or `assistant` - Squad, use `squadId` or `squad` - Workflow, use `workflowId` or `workflow` assistant : typing.Optional[CreateAssistantDto] This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. To start a call with: - Assistant, use `assistant` - Squad, use `squad` - Workflow, use `workflow` assistant_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `assistant` or `assistantId`'s settings and template variables. squad_id : typing.Optional[str] This is the squad that will be used for the call. To use a transient squad, use `squad` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` squad : typing.Optional[CreateSquadDto] This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` squad_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `squad` or `squadId`'s member settings and template variables. This will apply to all members of the squad. workflow_id : typing.Optional[str] This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` workflow : typing.Optional[CreateWorkflowDto] This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. To start a call with: - Assistant, use `assistant` or `assistantId` - Squad, use `squad` or `squadId` - Workflow, use `workflow` or `workflowId` workflow_overrides : typing.Optional[WorkflowOverrides] These are the overrides for the `workflow` or `workflowId`'s settings and template variables. phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. phone_number : typing.Optional[ImportTwilioPhoneNumberDto] This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. customer_id : typing.Optional[str] This is the customer that will be called. To call a transient customer , use `customer` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. customer : typing.Optional[CreateCustomerDto] This is the customer that will be called. To call an existing customer, use `customerId` instead. Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- CreateCallsResponse Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.create() asyncio.run(main()) """ _response = await self._raw_client.create( assistant_version=assistant_version, squad_version=squad_version, transport=transport, customers=customers, name=name, schedule_plan=schedule_plan, assistant_id=assistant_id, assistant=assistant, assistant_overrides=assistant_overrides, squad_id=squad_id, squad=squad, squad_overrides=squad_overrides, workflow_id=workflow_id, workflow=workflow, workflow_overrides=workflow_overrides, phone_number_id=phone_number_id, phone_number=phone_number, customer_id=customer_id, customer=customer, request_options=request_options, ) return _response.data async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: """ Returns the call identified by its ID, including its status, configuration, and available call data. Parameters ---------- id : str The unique identifier of the call. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.get( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.get(id, request_options=request_options) return _response.data async def delete( self, id: str, *, ids: typing.Optional[typing.Sequence[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Call: """ Deletes the call identified by its ID. Parameters ---------- id : str ids : typing.Optional[typing.Sequence[str]] These are the Call IDs to be bulk deleted. If provided, the call ID if any in the request query will be ignored When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. It may take up to a few hours to complete the bulk delete, and will be asynchronous. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.delete( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.delete(id, ids=ids, request_options=request_options) return _response.data async def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> Call: """ Updates the call identified by its ID. Parameters ---------- id : str The unique identifier of the call. name : typing.Optional[str] This is the name of the call. This is just for your own reference. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- Call Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.update( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.update(id, name=name, request_options=request_options) return _response.data async def call_artifact_controller_mono_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_mono_recording_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_mono_recording_download( id, request_options=request_options ) return _response.data async def call_artifact_controller_stereo_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_stereo_recording_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_stereo_recording_download( id, request_options=request_options ) return _response.data async def call_artifact_controller_video_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_video_recording_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_video_recording_download( id, request_options=request_options ) return _response.data async def call_artifact_controller_customer_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_customer_recording_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_customer_recording_download( id, request_options=request_options ) return _response.data async def call_artifact_controller_assistant_recording_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_assistant_recording_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_assistant_recording_download( id, request_options=request_options ) return _response.data async def call_artifact_controller_pcap_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_pcap_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_pcap_download(id, request_options=request_options) return _response.data async def call_artifact_controller_call_logs_download( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ Parameters ---------- id : str Call ID request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- None Examples -------- import asyncio from vapi import AsyncVapi client = AsyncVapi( token="YOUR_TOKEN", ) async def main() -> None: await client.calls.call_artifact_controller_call_logs_download( id="id", ) asyncio.run(main()) """ _response = await self._raw_client.call_artifact_controller_call_logs_download( id, request_options=request_options ) return _response.data