EndConversation: allows the agent to end the call, e.g. if the user says “Goodbye!”
vocode_client.actions.create_action(
request=CreateActionRequest(
type=ActionType.ACTION_END_CONVERSATION
)
)
const number = await vocode.actions.createAction({
type: "action_end_conversation",
});
curl --request POST \
--url https://api.vocode.dev/v1/actions/create \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'
--data '{
"type": "action_end_conversation"
}'
DTMF: allows the agent to hit dial tones during a call, e.g. navigating a phone tree
vocode_client.actions.create_action(
request=CreateActionRequest(
type=ActionType.ACTION_DTMF
)
)
const number = await vocode.actions.createAction({
type: "action_dtmf",
});
curl --request POST \
--url https://api.vocode.dev/v1/actions/create \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'
--data '{
"type": "action_dtmf"
}'
TransferCall: allows the agent to transfer the call to another phone number
vocode_client.actions.create_action(
request=CreateActionRequest(
type=ActionType.ACTION_TRANSFER_CALL,
config=TransferCallActionUpdateParamsConfig(
phone_number="11234567890"
)
)
)
const number = await vocode.actions.createAction({
type: "action_transfer_call",
config: {
phoneNumber: "11234567890",
},
});
curl --request POST \
--url https://api.vocode.dev/v1/actions/create \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'
--data '{
"type": "action_transfer_call",
"config": {
"phone_number": "11234567890"
}
}'
vocode_client.numbers.update_number(
phone_number="11234567890",
inbound_agent=UpdateNumberRequestInboundAgent(
actions=["<ACTION UUID>"]
)
)
vocode.numbers.updateNumber({
phoneNumber: "11234567890",
inboundAgent: {
actions: ["<ACTION UUID>"],
},
});
curl --request POST \
--url https://api.vocode.dev/v1/numbers/update?phone_number=11234567890 \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'
--data '{
"inbound_agent": {
"actions": ["<ACTION UUID>"]
}
}'
vocode_client.numbers.update_number(
phone_number="11234567890",
inbound_agent=UpdateNumberRequestInboundAgent(
actions=[TransferCallActionUpdateParams(
type=ActionType.ACTION_TRANSFER_CALL,
config=TransferCallActionUpdateParamsConfig(
phone_number="11234567890"
)
)]
)
)
vocode.numbers.updateNumber({
phoneNumber: "11234567890",
inboundAgent: {
actions: [
{
type: "action_transfer_call",
config: {
phoneNumber: "11234567890",
},
},
],
},
});
curl --request POST \
--url https://api.vocode.dev/v1/numbers/update?phone_number=11234567890 \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'
--data '{
"inbound_agent": {
"actions": [{
"type": "action_transfer_call",
"config": {
"phone_number": "11234567890"
}
}]
}
}'
