curl --request GET \
--url https://api.callva.io/api/v1/external/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.callva.io/api/v1/external/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.callva.io/api/v1/external/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Agent retrieved successfully",
"data": {
"id": "<string>",
"name": "<string>",
"preset": "<string>",
"prompt": "<string>",
"config": {},
"config_override_enabled": true,
"config_override": {},
"custom_webhook_enabled": true,
"custom_webhook_url": "<string>",
"custom_webhook_events": [
"<string>"
],
"custom_config_enabled": true,
"custom_config_url": "<string>",
"greeting_type": "<string>",
"greeting_exact": "<string>",
"greeting_instruction": "<string>",
"agent_speaks_first": true,
"is_active": true,
"is_default": true,
"is_system": true,
"created_at": "<string>",
"updated_at": "<string>",
"compiled_prompt": "<string>",
"phone_numbers": [
{
"id": "<string>",
"phone_number": "<string>",
"phone_number_friendly": "<string>",
"number_type": "<string>",
"status": "<string>"
}
],
"phone_number_ids": [
"<string>"
]
}
}{
"success": true,
"message": "Project context required"
}{
"error": "Invalid or expired token",
"message": "The provided token is invalid or has expired"
}{
"success": true,
"message": "Insufficient permission.",
"code": "insufficient_permission"
}{
"success": true,
"message": "Agent not found"
}{
"success": true,
"message": "<string>"
}Get an agent
Requires permission: agents.read.
What a token may call depends on its role: see Authentication and permissions.
curl --request GET \
--url https://api.callva.io/api/v1/external/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.callva.io/api/v1/external/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.callva.io/api/v1/external/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Agent retrieved successfully",
"data": {
"id": "<string>",
"name": "<string>",
"preset": "<string>",
"prompt": "<string>",
"config": {},
"config_override_enabled": true,
"config_override": {},
"custom_webhook_enabled": true,
"custom_webhook_url": "<string>",
"custom_webhook_events": [
"<string>"
],
"custom_config_enabled": true,
"custom_config_url": "<string>",
"greeting_type": "<string>",
"greeting_exact": "<string>",
"greeting_instruction": "<string>",
"agent_speaks_first": true,
"is_active": true,
"is_default": true,
"is_system": true,
"created_at": "<string>",
"updated_at": "<string>",
"compiled_prompt": "<string>",
"phone_numbers": [
{
"id": "<string>",
"phone_number": "<string>",
"phone_number_friendly": "<string>",
"number_type": "<string>",
"status": "<string>"
}
],
"phone_number_ids": [
"<string>"
]
}
}{
"success": true,
"message": "Project context required"
}{
"error": "Invalid or expired token",
"message": "The provided token is invalid or has expired"
}{
"success": true,
"message": "Insufficient permission.",
"code": "insufficient_permission"
}{
"success": true,
"message": "Agent not found"
}{
"success": true,
"message": "<string>"
}Authorizations
A CallVA API token, sent as Authorization: Bearer <token>.
Creating one. In the CallVA dashboard, open the organization's Settings, then API Keys, and choose Create API Key: give the key a name, choose its role, and choose its project scope - All projects for an organization-wide token, or one project for a project token. The key is shown once, when it is created, and cannot be read again; store it then. Creating keys needs the api_tokens.create permission, which owners and admins hold, and a key cannot create another key.
Organization-wide or project token. A project token works in the one project it was created for; any project named in the request is ignored. An organization-wide token reaches the projects of its organization, and each request names its project with the X-Project-ID header or project_id (query string for reads and deletes, body for writes).
What it can call. The token's role decides which endpoints it may call; each endpoint names the permission it requires, and a token whose role lacks it is answered 403.
Headers
The project this request acts in. Required with an organization-wide token (or send project_id instead); ignored with a project token, which always acts in its own project.