DocumentationAPI ReferenceChangelog

Envocal API

API Reference API Changelog

Endpoints

List agents of a tenant GETCreate an agent POSTGet an agent GETDelete an agent DELETEUpdate an agent PUTAssign a phone number to an agent POSTUnassign an agent's phone number DELETEList an agent's knowledge bases GETLink a knowledge base to an agent POSTUnlink a knowledge base from an agent DELETEList agent templates GETCreate an agent from a template POST
Agents

Assign a phone number to an agent

Update an agent PUT

Replaces the agent's settings. Send the version you read; it changes on every update. Voice settings left null keep their current value. knowledgeBaseIds: null keeps the current links, [] removes all, a list replaces them. The tenant cannot be changed.

Unassign an agent's phone number DELETE

Requires agents:write

POST
/v1/tenants/{tenantId}/agents/{agentId}/phone-numbers/{phoneNumberId}

Calls to the number are then answered by this agent. An agent has at most one number; assigning another replaces it. The number must belong to the agent's tenant and not be assigned to another agent.

Required permission: agents:write

Authorization

Bearer
headerAuthorizationBearer <token>

Tenant API key (evk_…), created in Studio → Vault → API keys.

Path Parameters

tenantId*string

Tenant id, or current for the key's own tenant. Must be the key's tenant or one of its sub-tenants.

agentId*string

Agent id.

phoneNumberId*string

Phone number id (from the phone number list).

Response Body

Assigned (also when it already was).

Example Request
curl -X POST 'https://api.envocal.ai/v1/tenants/string/agents/string/phone-numbers/string'
Example Response
Empty
Example Request
curl -X POST 'https://api.envocal.ai/v1/tenants/string/agents/string/phone-numbers/string'