Skip to main content
Docs menu: Agents

API reference

Agents

Read an agent and change its prompts, settings and outbound prompts.

Get agent details

GET https://api.telvana.com/agents/{agentId}

Retrieve details of a specific agent including configuration settings.

Path parameters

Name Description
agentId string required Unique identifier for the agent

Example request

curl "https://api.telvana.com/agents/{agentId}" \
  -H "x-api-key: $TELVANA_API_KEY"

Response 200

Agent retrieved successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the agent
name string Agent name
description string | null Agent description
isActive boolean Whether the agent is active
inboundPrompt string | null Prompt for inbound calls
hasCallTransfer boolean Whether call transfer is enabled
hasEndCall boolean Whether end call tool is enabled
transferCallerId string Caller ID mode for transfers: "human" or "agent"
hasAutoInboundTransfer boolean Whether auto inbound transfer is enabled
inboundTransferNumber string | null Phone number for auto inbound transfer
isMultilingual boolean Whether multilingual support is enabled
hasBargeIn boolean Whether barge-in (interruption) is enabled
hasPostConversationWebhook boolean Whether post-conversation webhook is enabled
postConversationWebhookUrl string | null URL for post-conversation webhook
hasHints boolean Whether speech recognition hints are enabled
hints string | null Speech recognition hints (comma-separated)
hasLanguage boolean Whether custom language is enabled
language string | null Language code (e.g., en-US)
voiceId string | null Voice ID for TTS
personaName string | null Spoken assistant name (GPT-Live voice card)
businessName string | null Spoken business name (GPT-Live voice card)
inboundGreeting string | null Exact inbound opening line (GPT-Live voice card)
voiceScope string | null What the agent helps with (GPT-Live voice card)
voiceTone calm | warm | professional | null Tone preset: calm, warm or professional
aiDisclosure string | null Answer to "are you an AI" (GPT-Live voice card)
voiceCardEdited boolean True once the voice card was edited by hand; automatic derivation then leaves it
inboundVoicePrompt string | null Hand-written GPT-Live voice prompt for inbound calls, opening line included; replaces the voice card for the voice model
inboundSinglePrompt string | null Inbound prompt in the single-prompt template; while set, inboundPrompt and inboundVoicePrompt are rendered from it
integrationIds array of string Array of integration IDs
disabledToolNames array of string Array of disabled workspace tool names
phoneNumberId string | null Associated phone number ID
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "jm1u1cawc7dka1x84mrjvb4y",
    "name": "Customer Service Agent",
    "description": "Handles customer inquiries",
    "isActive": true,
    "inboundPrompt": "You are a helpful customer service agent...",
    "hasCallTransfer": true,
    "hasEndCall": true,
    "hasAutoInboundTransfer": false,
    "inboundTransferNumber": null,
    "isMultilingual": false,
    "hasBargeIn": true,
    "hasPostConversationWebhook": false,
    "postConversationWebhookUrl": null,
    "hasHints": false,
    "hints": null,
    "hasLanguage": true,
    "language": "en-US",
    "voiceId": "pNInz6obpgDQGcFmaJgB",
    "integrationIds": [],
    "phoneNumberId": "ph_abc123",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-15T00:00:00.000Z"
  }
}

Get website chat prompt

GET https://api.telvana.com/agents/{agentId}/chat-prompt

Retrieve only the website chat prompt for an agent in the API key's workspace.

Path parameters

Name Description
agentId string required

Example request

curl "https://api.telvana.com/agents/{agentId}/chat-prompt" \
  -H "x-api-key: $TELVANA_API_KEY"

Response 200

Chat prompt retrieved successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the agent
chatPrompt string | null Prompt for website chat conversations

Update website chat prompt

PUT https://api.telvana.com/agents/{agentId}/chat-prompt

Replace only the website chat prompt for an agent in the API key's workspace.

Path parameters

Name Description
agentId string required

Request body (application/json)

Name Description
chatPrompt string required The new website chat prompt for the agent (up to 100,000 characters)

Example request

curl -X PUT "https://api.telvana.com/agents/{agentId}/chat-prompt" \
  -H "x-api-key: $TELVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chatPrompt": "<chatPrompt>"
  }'

Response 200

Chat prompt updated successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the agent
chatPrompt string | null Prompt for website chat conversations

Update inbound prompt

PUT https://api.telvana.com/agents/{agentId}/inbound-prompt

Update the inbound prompt for an agent.

Path parameters

Name Description
agentId string required Unique identifier for the agent

Request body (application/json)

Name Description
inboundPrompt string required The new inbound prompt for the agent

Example request

curl -X PUT "https://api.telvana.com/agents/{agentId}/inbound-prompt" \
  -H "x-api-key: $TELVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inboundPrompt": "You are a helpful customer service agent for Acme Corp. Be polite and helpful."
  }'

Response 200

Inbound prompt updated successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the agent
name string Agent name
description string | null Agent description
isActive boolean Whether the agent is active
inboundPrompt string | null Prompt for inbound calls
hasCallTransfer boolean Whether call transfer is enabled
hasEndCall boolean Whether end call tool is enabled
transferCallerId string Caller ID mode for transfers: "human" or "agent"
hasAutoInboundTransfer boolean Whether auto inbound transfer is enabled
inboundTransferNumber string | null Phone number for auto inbound transfer
isMultilingual boolean Whether multilingual support is enabled
hasBargeIn boolean Whether barge-in (interruption) is enabled
hasPostConversationWebhook boolean Whether post-conversation webhook is enabled
postConversationWebhookUrl string | null URL for post-conversation webhook
hasHints boolean Whether speech recognition hints are enabled
hints string | null Speech recognition hints (comma-separated)
hasLanguage boolean Whether custom language is enabled
language string | null Language code (e.g., en-US)
voiceId string | null Voice ID for TTS
personaName string | null Spoken assistant name (GPT-Live voice card)
businessName string | null Spoken business name (GPT-Live voice card)
inboundGreeting string | null Exact inbound opening line (GPT-Live voice card)
voiceScope string | null What the agent helps with (GPT-Live voice card)
voiceTone calm | warm | professional | null Tone preset: calm, warm or professional
aiDisclosure string | null Answer to "are you an AI" (GPT-Live voice card)
voiceCardEdited boolean True once the voice card was edited by hand; automatic derivation then leaves it
inboundVoicePrompt string | null Hand-written GPT-Live voice prompt for inbound calls, opening line included; replaces the voice card for the voice model
inboundSinglePrompt string | null Inbound prompt in the single-prompt template; while set, inboundPrompt and inboundVoicePrompt are rendered from it
integrationIds array of string Array of integration IDs
disabledToolNames array of string Array of disabled workspace tool names
phoneNumberId string | null Associated phone number ID
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "jm1u1cawc7dka1x84mrjvb4y",
    "name": "Customer Service Agent",
    "inboundPrompt": "You are a helpful customer service agent for Acme Corp. Be polite and helpful."
  },
  "message": "Inbound prompt updated successfully"
}

Update agent settings

PUT https://api.telvana.com/agents/{agentId}/settings

Update agent configuration settings including call transfer, multilingual support, webhooks, and more.

Path parameters

Name Description
agentId string required Unique identifier for the agent

Request body (application/json)

Name Description
inboundSinglePrompt null null stops using the inbound single prompt (set in the portal), leaving inboundPrompt and inboundVoicePrompt as they are
hasCallTransfer boolean Enable/disable call transfer
hasEndCall boolean Enable/disable end call tool
transferCallerId human | agent Caller ID shown on transfer: "human" (caller number) or "agent" (business number)
hasAutoInboundTransfer boolean Enable/disable auto inbound transfer
inboundTransferNumber string | null Phone number for auto inbound transfer
isMultilingual boolean Enable/disable multilingual support
hasBargeIn boolean Enable/disable barge-in (interruption)
hasPostConversationWebhook boolean Enable/disable post-conversation webhook
postConversationWebhookUrl string | null URL for post-conversation webhook
hasHints boolean Enable/disable speech recognition hints
hints string | null Speech recognition hints (comma-separated)
hasLanguage boolean Enable/disable custom language
language string | null Language code (e.g., en-US)
voiceId string | null Voice ID for TTS
personaName string | null Spoken name of the assistant for GPT-Live voices, e.g. "Marin" (up to 120 characters)
businessName string | null Business name as it should be spoken; defaults to the workspace name (up to 120 characters)
inboundGreeting string | null Exact opening line for inbound calls on GPT-Live voices (up to 600 characters)
voiceScope string | null One to three sentences on what this agent helps with (up to 1,000 characters)
voiceTone calm | warm | professional | null Speaking tone preset for GPT-Live voices
aiDisclosure string | null What the assistant says when asked whether it is an AI (up to 300 characters)
inboundVoicePrompt string | null Optional hand-written prompt for the GPT-Live voice model on inbound calls, opening line included; the full prompt still drives the backend. Empty or null clears it (up to 20,000 characters)
integrationIds array of string Array of integration IDs
disabledToolNames array of string Array of disabled workspace tool names

Example request

curl -X PUT "https://api.telvana.com/agents/{agentId}/settings" \
  -H "x-api-key: $TELVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hasCallTransfer": true,
    "hasEndCall": true,
    "hasBargeIn": true,
    "language": "en-US",
    "voiceId": "pNInz6obpgDQGcFmaJgB",
    "personaName": "Marin",
    "businessName": "Butterfly",
    "inboundGreeting": "Thanks for calling Butterfly, this is Marin. How can I help?",
    "voiceScope": "Trip reminders and questions about a scheduled ride.",
    "voiceTone": "calm",
    "inboundVoicePrompt": "You are Marin, the voice of Butterfly. Open with: \"Thanks for calling Butterfly, this is Marin. How can I help?\" Then hand every request to the assistant."
  }'

Response 200

Agent settings updated successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the agent
name string Agent name
description string | null Agent description
isActive boolean Whether the agent is active
inboundPrompt string | null Prompt for inbound calls
hasCallTransfer boolean Whether call transfer is enabled
hasEndCall boolean Whether end call tool is enabled
transferCallerId string Caller ID mode for transfers: "human" or "agent"
hasAutoInboundTransfer boolean Whether auto inbound transfer is enabled
inboundTransferNumber string | null Phone number for auto inbound transfer
isMultilingual boolean Whether multilingual support is enabled
hasBargeIn boolean Whether barge-in (interruption) is enabled
hasPostConversationWebhook boolean Whether post-conversation webhook is enabled
postConversationWebhookUrl string | null URL for post-conversation webhook
hasHints boolean Whether speech recognition hints are enabled
hints string | null Speech recognition hints (comma-separated)
hasLanguage boolean Whether custom language is enabled
language string | null Language code (e.g., en-US)
voiceId string | null Voice ID for TTS
personaName string | null Spoken assistant name (GPT-Live voice card)
businessName string | null Spoken business name (GPT-Live voice card)
inboundGreeting string | null Exact inbound opening line (GPT-Live voice card)
voiceScope string | null What the agent helps with (GPT-Live voice card)
voiceTone calm | warm | professional | null Tone preset: calm, warm or professional
aiDisclosure string | null Answer to "are you an AI" (GPT-Live voice card)
voiceCardEdited boolean True once the voice card was edited by hand; automatic derivation then leaves it
inboundVoicePrompt string | null Hand-written GPT-Live voice prompt for inbound calls, opening line included; replaces the voice card for the voice model
inboundSinglePrompt string | null Inbound prompt in the single-prompt template; while set, inboundPrompt and inboundVoicePrompt are rendered from it
integrationIds array of string Array of integration IDs
disabledToolNames array of string Array of disabled workspace tool names
phoneNumberId string | null Associated phone number ID
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "jm1u1cawc7dka1x84mrjvb4y",
    "hasCallTransfer": true,
    "hasEndCall": true,
    "hasBargeIn": true,
    "language": "en-US"
  },
  "message": "Agent settings updated successfully"
}

List outbound prompts

GET https://api.telvana.com/agents/{agentId}/outbound-prompts

Retrieve all outbound prompts for an agent.

Path parameters

Name Description
agentId string required Unique identifier for the agent

Example request

curl "https://api.telvana.com/agents/{agentId}/outbound-prompts" \
  -H "x-api-key: $TELVANA_API_KEY"

Response 200

Outbound prompts retrieved successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the outbound prompt
title string Title of the outbound prompt
instructions string Instructions/prompt for outbound calls
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}}
personaName string | null Name the assistant gives on this prompt
businessName string | null Business this prompt calls for, as spoken
scope string | null What this prompt helps with, derived from it
voiceCardEdited boolean True once this card was edited by hand
voicePrompt string | null Hand-written GPT-Live voice prompt for this outbound prompt, opening line included; replaces the voice card for the voice model
singlePrompt string | null This prompt in the single-prompt template; while set, instructions, voicePrompt and opening are rendered from it
agentId string ID of the agent this prompt belongs to
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": [
    {
      "id": "prompt_abc123",
      "title": "Appointment Confirmation",
      "instructions": "Call to confirm the appointment for {{firstName}} at {{appointmentTime}}.",
      "agentId": "jm1u1cawc7dka1x84mrjvb4y",
      "createdAt": "2025-01-01T00:00:00.000Z",
      "updatedAt": "2025-01-01T00:00:00.000Z"
    },
    {
      "id": "prompt_def456",
      "title": "Follow-up Call",
      "instructions": "Follow up with {{firstName}} regarding their recent inquiry.",
      "agentId": "jm1u1cawc7dka1x84mrjvb4y",
      "createdAt": "2025-01-02T00:00:00.000Z",
      "updatedAt": "2025-01-02T00:00:00.000Z"
    }
  ]
}

Create outbound prompt

POST https://api.telvana.com/agents/{agentId}/outbound-prompts

Create a new outbound prompt for an agent.

Path parameters

Name Description
agentId string required Unique identifier for the agent

Request body (application/json)

Name Description
title string required Title of the outbound prompt
instructions string required Instructions/prompt for outbound calls
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}} (up to 600 characters)
personaName string | null Name the assistant gives on this prompt (GPT-Live voice card) (up to 120 characters)
businessName string | null Business this prompt calls for, as spoken (GPT-Live voice card) (up to 120 characters)
voicePrompt string | null Optional hand-written prompt for the GPT-Live voice model on this outbound prompt's calls, opening line included; the full prompt still drives the backend. Omit or null for none (up to 20,000 characters)

Example request

curl -X POST "https://api.telvana.com/agents/{agentId}/outbound-prompts" \
  -H "x-api-key: $TELVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Appointment Reminder",
    "instructions": "Call {{firstName}} to remind them of their appointment at {{appointmentTime}}. Be friendly and confirm they can still make it.",
    "opening": "Hi {{firstName}}, this is Butterfly calling about your appointment at {{appointmentTime}}.",
    "voicePrompt": "You are the voice of Butterfly on a reminder call. Open with: \"Hi {{firstName}}, this is Butterfly calling about your appointment at {{appointmentTime}}.\" Confirm it, then hand every other request to the assistant."
  }'

Response 201

Outbound prompt created successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the outbound prompt
title string Title of the outbound prompt
instructions string Instructions/prompt for outbound calls
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}}
personaName string | null Name the assistant gives on this prompt
businessName string | null Business this prompt calls for, as spoken
scope string | null What this prompt helps with, derived from it
voiceCardEdited boolean True once this card was edited by hand
voicePrompt string | null Hand-written GPT-Live voice prompt for this outbound prompt, opening line included; replaces the voice card for the voice model
singlePrompt string | null This prompt in the single-prompt template; while set, instructions, voicePrompt and opening are rendered from it
agentId string ID of the agent this prompt belongs to
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "prompt_xyz789",
    "title": "Appointment Reminder",
    "instructions": "Call {{firstName}} to remind them of their appointment at {{appointmentTime}}. Be friendly and confirm they can still make it.",
    "agentId": "jm1u1cawc7dka1x84mrjvb4y",
    "createdAt": "2025-01-15T00:00:00.000Z",
    "updatedAt": "2025-01-15T00:00:00.000Z"
  },
  "message": "Outbound prompt created successfully"
}

Get outbound prompt

GET https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}

Retrieve a specific outbound prompt by ID.

Path parameters

Name Description
agentId string required Unique identifier for the agent
promptId string required Unique identifier for the outbound prompt

Example request

curl "https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}" \
  -H "x-api-key: $TELVANA_API_KEY"

Response 200

Outbound prompt retrieved successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the outbound prompt
title string Title of the outbound prompt
instructions string Instructions/prompt for outbound calls
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}}
personaName string | null Name the assistant gives on this prompt
businessName string | null Business this prompt calls for, as spoken
scope string | null What this prompt helps with, derived from it
voiceCardEdited boolean True once this card was edited by hand
voicePrompt string | null Hand-written GPT-Live voice prompt for this outbound prompt, opening line included; replaces the voice card for the voice model
singlePrompt string | null This prompt in the single-prompt template; while set, instructions, voicePrompt and opening are rendered from it
agentId string ID of the agent this prompt belongs to
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "prompt_abc123",
    "title": "Appointment Confirmation",
    "instructions": "Call to confirm the appointment for {{firstName}} at {{appointmentTime}}.",
    "agentId": "jm1u1cawc7dka1x84mrjvb4y",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-01T00:00:00.000Z"
  }
}

Update outbound prompt

PUT https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}

Update an existing outbound prompt.

Path parameters

Name Description
agentId string required Unique identifier for the agent
promptId string required Unique identifier for the outbound prompt

Request body (application/json)

Name Description
title string Updated title
instructions string Updated instructions
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}} (up to 600 characters)
personaName string | null Name the assistant gives on this prompt (GPT-Live voice card) (up to 120 characters)
businessName string | null Business this prompt calls for, as spoken (GPT-Live voice card) (up to 120 characters)
voicePrompt string | null Optional hand-written prompt for the GPT-Live voice model on this outbound prompt's calls, opening line included; the full prompt still drives the backend. Empty or null clears it (up to 20,000 characters)
singlePrompt null null stops using the single prompt (set in the portal), leaving instructions, voicePrompt and opening as they are

Example request

curl -X PUT "https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}" \
  -H "x-api-key: $TELVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Appointment Confirmation",
    "instructions": "Call {{firstName}} to confirm their appointment at {{appointmentTime}}. Be professional and courteous.",
    "opening": "Hi {{firstName}}, this is Butterfly confirming your appointment at {{appointmentTime}}.",
    "voicePrompt": "You are the voice of Butterfly on a confirmation call. Open with: \"Hi {{firstName}}, this is Butterfly confirming your appointment at {{appointmentTime}}.\" Confirm it, then hand every other request to the assistant."
  }'

Response 200

Outbound prompt updated successfully. Errors use the format in Errors .

Fields in data

Name Description
id string Unique identifier for the outbound prompt
title string Title of the outbound prompt
instructions string Instructions/prompt for outbound calls
opening string | null Exact opening line for GPT-Live voices; {{variables}} allowed, and the line may choose between two texts by comparing a variable with a number, as {{count < 2 ? "text when under two" : "text otherwise, {{count}} allowed here too"}}
personaName string | null Name the assistant gives on this prompt
businessName string | null Business this prompt calls for, as spoken
scope string | null What this prompt helps with, derived from it
voiceCardEdited boolean True once this card was edited by hand
voicePrompt string | null Hand-written GPT-Live voice prompt for this outbound prompt, opening line included; replaces the voice card for the voice model
singlePrompt string | null This prompt in the single-prompt template; while set, instructions, voicePrompt and opening are rendered from it
agentId string ID of the agent this prompt belongs to
createdAt string (date-time) Creation timestamp
updatedAt string (date-time) Last update timestamp

Example response

{
  "data": {
    "id": "prompt_abc123",
    "title": "Updated Appointment Confirmation",
    "instructions": "Call {{firstName}} to confirm their appointment at {{appointmentTime}}. Be professional and courteous.",
    "agentId": "jm1u1cawc7dka1x84mrjvb4y",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-15T00:00:00.000Z"
  },
  "message": "Outbound prompt updated successfully"
}

Delete outbound prompt

DELETE https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}

Delete an outbound prompt.

Path parameters

Name Description
agentId string required Unique identifier for the agent
promptId string required Unique identifier for the outbound prompt

Example request

curl -X DELETE "https://api.telvana.com/agents/{agentId}/outbound-prompts/{promptId}" \
  -H "x-api-key: $TELVANA_API_KEY"

Response 200

Outbound prompt deleted successfully. Errors use the format in Errors .

Example response

{
  "data": null,
  "message": "Outbound prompt deleted successfully"
}