Skip to content

Latest commit

 

History

History
3294 lines (2235 loc) · 34.4 KB

reference.md

File metadata and controls

3294 lines (2235 loc) · 34.4 KB

Reference

client.metrics_metrics_get()

📝 Description

Endpoint that serves Prometheus metrics.

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.metrics_metrics_get()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

numbers

client.numbers.list_numbers(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.list_numbers()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.numbers.get_number(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.get_number(
    phone_number="phone_number",
)

⚙️ Parameters

phone_number: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.numbers.buy_number(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.buy_number()

⚙️ Parameters

area_code: typing.Optional[str]

telephony_provider: typing.Optional[BuyPhoneNumberRequestTelephonyProvider]

telephony_account_connection: typing.Optional[str]

inbound_agent: typing.Optional[BuyPhoneNumberRequestInboundAgent]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.numbers.update_number(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.update_number(
    phone_number="phone_number",
)

⚙️ Parameters

phone_number: str

outbound_only: typing.Optional[UpdateNumberRequestOutboundOnly]

example_context: typing.Optional[UpdateNumberRequestExampleContext]

label: typing.Optional[UpdateNumberRequestLabel]

inbound_agent: typing.Optional[UpdateNumberRequestInboundAgent]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.numbers.cancel_number(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.cancel_number(
    phone_number="phone_number",
)

⚙️ Parameters

phone_number: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.numbers.link_number(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.numbers.link_number(
    phone_number="phone_number",
    telephony_account_connection="telephony_account_connection",
)

⚙️ Parameters

phone_number: str

telephony_account_connection: str

outbound_only: typing.Optional[bool]

inbound_agent: typing.Optional[LinkPhoneNumberRequestInboundAgent]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

calls

client.calls.list_calls(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.calls.list_calls()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.get_call(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.calls.get_call(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.end_call(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.calls.end_call(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.create_call(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.calls.create_call(
    from_number="from_number",
    to_number="to_number",
    agent="agent",
)

⚙️ Parameters

from_number: str

to_number: str

agent: CreateCallRequestAgent

on_no_human_answer: typing.Optional[CreateCallRequestOnNoHumanAnswer]

run_do_not_call_detection: typing.Optional[bool]

hipaa_compliant: typing.Optional[bool]

context: typing.Optional[typing.Dict[str, typing.Optional[str]]]

telephony_params: typing.Optional[typing.Dict[str, typing.Optional[str]]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.get_recording(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.calls.get_recording(
    id="string",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Usage

client.usage.get_usage()

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.usage.get_usage()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Actions

client.actions.get_action(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.actions.get_action(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.actions.list_actions(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.actions.list_actions()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.actions.create_action(...)

🔌 Usage

from vocode import AddToConferenceActionParams, AddToConferenceConfig, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.actions.create_action(
    request=AddToConferenceActionParams(
        config=AddToConferenceConfig(
            phone_number="phone_number",
        ),
    ),
)

⚙️ Parameters

request: ActionParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.actions.update_action(...)

🔌 Usage

from vocode import AddToConferenceActionUpdateParams, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.actions.update_action(
    id="id",
    request=AddToConferenceActionUpdateParams(),
)

⚙️ Parameters

id: str

request: ActionUpdateParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Agents

client.agents.get_agent(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.agents.get_agent(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.agents.list_agents(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.agents.list_agents()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.agents.create_agent(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.agents.create_agent(
    prompt="prompt",
    voice="voice",
)

⚙️ Parameters

prompt: AgentParamsPrompt

voice: AgentParamsVoice

name: typing.Optional[str]

language: typing.Optional[Language]

actions: typing.Optional[typing.Sequence[AgentParamsActionsItem]]

initial_message: typing.Optional[str]

webhook: typing.Optional[AgentParamsWebhook]

vector_database: typing.Optional[AgentParamsVectorDatabase]

interrupt_sensitivity: typing.Optional[InterruptSensitivity]

context_endpoint: typing.Optional[str]

noise_suppression: typing.Optional[bool]

endpointing_sensitivity: typing.Optional[AgentParamsEndpointingSensitivity]

ivr_navigation_mode: typing.Optional[AgentParamsIvrNavigationMode]

conversation_speed: typing.Optional[float]

initial_message_delay: typing.Optional[float]

openai_model_name_override: typing.Optional[str]

ask_if_human_present_on_idle: typing.Optional[bool]

openai_account_connection: typing.Optional[AgentParamsOpenaiAccountConnection]

run_do_not_call_detection: typing.Optional[bool]

llm_fallback: typing.Optional[InternalLlmFallback]

deepgram_keywords: typing.Optional[ typing.Dict[str, typing.Optional[AgentParamsDeepgramKeywordsValue]] ]

idle_time_seconds: typing.Optional[int]

llm_temperature: typing.Optional[float]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.agents.update_agent(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.agents.update_agent(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[AgentUpdateParamsName]

prompt: typing.Optional[AgentUpdateParamsPrompt]

language: typing.Optional[AgentUpdateParamsLanguage]

actions: typing.Optional[AgentUpdateParamsActions]

voice: typing.Optional[AgentUpdateParamsVoice]

initial_message: typing.Optional[AgentUpdateParamsInitialMessage]

webhook: typing.Optional[AgentUpdateParamsWebhook]

vector_database: typing.Optional[AgentUpdateParamsVectorDatabase]

interrupt_sensitivity: typing.Optional[AgentUpdateParamsInterruptSensitivity]

context_endpoint: typing.Optional[AgentUpdateParamsContextEndpoint]

noise_suppression: typing.Optional[AgentUpdateParamsNoiseSuppression]

endpointing_sensitivity: typing.Optional[AgentUpdateParamsEndpointingSensitivity]

ivr_navigation_mode: typing.Optional[AgentUpdateParamsIvrNavigationMode]

conversation_speed: typing.Optional[AgentUpdateParamsConversationSpeed]

initial_message_delay: typing.Optional[AgentUpdateParamsInitialMessageDelay]

openai_model_name_override: typing.Optional[AgentUpdateParamsOpenaiModelNameOverride]

ask_if_human_present_on_idle: typing.Optional[AgentUpdateParamsAskIfHumanPresentOnIdle]

openai_account_connection: typing.Optional[AgentUpdateParamsOpenaiAccountConnection]

run_do_not_call_detection: typing.Optional[AgentUpdateParamsRunDoNotCallDetection]

llm_fallback: typing.Optional[AgentUpdateParamsLlmFallback]

deepgram_keywords: typing.Optional[AgentUpdateParamsDeepgramKeywords]

idle_time_seconds: typing.Optional[AgentUpdateParamsIdleTimeSeconds]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Voices

client.voices.get_voice(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.voices.get_voice(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.voices.list_voices(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.voices.list_voices()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.voices.create_voice(...)

🔌 Usage

from vocode import AzureVoiceParams, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.voices.create_voice(
    request=AzureVoiceParams(
        voice_name="voice_name",
    ),
)

⚙️ Parameters

request: VoiceParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.voices.update_voice(...)

🔌 Usage

from vocode import AzureVoiceUpdateParams, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.voices.update_voice(
    id="id",
    request=AzureVoiceUpdateParams(),
)

⚙️ Parameters

id: str

request: VoiceUpdateParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Webhooks

client.webhooks.get_webhook(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.webhooks.get_webhook(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.list_webhooks(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.webhooks.list_webhooks()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.create_webhook(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.webhooks.create_webhook(
    subscriptions=["event_message"],
    url="url",
)

⚙️ Parameters

subscriptions: typing.Sequence[EventType]

url: str

method: typing.Optional[HttpMethod]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.update_webhook(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.webhooks.update_webhook(
    id="id",
)

⚙️ Parameters

id: str

subscriptions: typing.Optional[WebhookUpdateParamsSubscriptions]

url: typing.Optional[WebhookUpdateParamsUrl]

method: typing.Optional[WebhookUpdateParamsMethod]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Prompts

client.prompts.get_prompt(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.prompts.get_prompt(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.prompts.list_prompts(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.prompts.list_prompts()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.prompts.create_prompt(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.prompts.create_prompt()

⚙️ Parameters

content: typing.Optional[str]

collect_fields: typing.Optional[typing.Sequence[CollectField]]

context_endpoint: typing.Optional[str]

prompt_template: typing.Optional[PromptParamsPromptTemplate]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.prompts.update_prompt(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.prompts.update_prompt(
    id="id",
)

⚙️ Parameters

id: str

content: typing.Optional[PromptUpdateParamsContent]

collect_fields: typing.Optional[PromptUpdateParamsCollectFields]

context_endpoint: typing.Optional[PromptUpdateParamsContextEndpoint]

prompt_template: typing.Optional[PromptUpdateParamsPromptTemplate]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

VectorDatabases

client.vector_databases.get_vector_database(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.vector_databases.get_vector_database(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.vector_databases.list_vector_databases(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.vector_databases.list_vector_databases()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.vector_databases.create_vector_database(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.vector_databases.create_vector_database(
    index="index",
    api_key="api_key",
    api_environment="api_environment",
)

⚙️ Parameters

index: str

api_key: str

api_environment: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.vector_databases.update_vector_database(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.vector_databases.update_vector_database(
    id="id",
)

⚙️ Parameters

id: str

index: typing.Optional[PineconeVectorDatabaseUpdateParamsIndex]

api_key: typing.Optional[PineconeVectorDatabaseUpdateParamsApiKey]

api_environment: typing.Optional[PineconeVectorDatabaseUpdateParamsApiEnvironment]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

AccountConnections

client.account_connections.get_account_connection(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.get_account_connection(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.account_connections.list_account_connections(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.list_account_connections()

⚙️ Parameters

page: typing.Optional[int]

size: typing.Optional[int]

sort_column: typing.Optional[str]

sort_desc: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.account_connections.create_account_connection(...)

🔌 Usage

from vocode import OpenAiAccountConnectionParams, OpenAiCredentials, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.create_account_connection(
    request=OpenAiAccountConnectionParams(
        credentials=OpenAiCredentials(
            openai_api_key="openai_api_key",
        ),
    ),
)

⚙️ Parameters

request: AccountConnectionParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.account_connections.update_account_connection(...)

🔌 Usage

from vocode import OpenAiAccountConnectionUpdateParams, Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.update_account_connection(
    id="id",
    request=OpenAiAccountConnectionUpdateParams(),
)

⚙️ Parameters

id: str

request: AccountConnectionUpdateParamsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.account_connections.add_to_steering_pool(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.add_to_steering_pool(
    id="id",
)

⚙️ Parameters

id: str

request: typing.Optional[AddToSteeringPoolBody]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.account_connections.remove_from_steering_pool(...)

🔌 Usage

from vocode import Vocode

client = Vocode(
    token="YOUR_TOKEN",
)
client.account_connections.remove_from_steering_pool(
    id="id",
    phone_number="phone_number",
)

⚙️ Parameters

id: str

phone_number: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.