DocumentationAPI ReferenceChangelog

Envocal API

API Reference Tools guide MCP server 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 DELETEGet an agent's tools GETSet an agent's tools PUTList agent templates GETCreate an agent from a template POST
Agents

Get an agent's tools

Unlink a knowledge base from an agent DELETE

The knowledge base itself is not deleted.

Set an agent's tools PUT

Replaces all of the agent's tools. Each id is a tool (GET /v1/tenants/{tenantId}/tools) of the agent's tenant, and the tool's availability must include the phase it is placed in: - before: run in order when the conversation starts (e.g. look up the caller). - during: offered to the AI model as functions it can call during the conversation. - after: run in order after the conversation ends (e.g. post a summary to a CRM). Output of earlier tools is available to later ones through dynamic variables, so before and after can form tool chains.

GET
/v1/tenants/{tenantId}/agents/{id}/tools

The tools the agent uses, as tool ids (GET /v1/tenants/{tenantId}/tools) per phase. before and after are in the order they run.

Required permission: agents:read

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.

id*string

Agent id.

Response Body

The agent's tools per phase.

  1. response
  1. response
  2. …

The tools an agent uses, per phase, as tool ids (GET /v1/tenants/{tenantId}/tools). A list left out is empty.

before?array<>

Run in this order when the conversation starts, before the AI speaks (e.g. look up the caller in a CRM).

during?array<>

Offered to the AI model as functions it may call during the conversation. Order does not matter.

after?array<>

Run in this order after the conversation ends (e.g. post a summary or create a ticket).

Example Request
curl -X GET 'https://api.envocal.ai/v1/tenants/string/agents/string/tools'
Example Response
{  "before": [    "8e6267db-32ed-454a-a2cc-6beef2f6f00e"  ],  "during": [    "e3ae3f0a-5397-4416-b273-f7833a7fddc8"  ],  "after": [    "3f00dd4a-56f2-49c5-940c-69eed8a9fb5b"  ]}
GET
/v1/tenants/{tenantId}/agents/{id}/tools
Example Request
curl -X GET 'https://api.envocal.ai/v1/tenants/string/agents/string/tools'
{
  "before": [
    "8e6267db-32ed-454a-a2cc-6beef2f6f00e"
  ],
  "during": [
    "e3ae3f0a-5397-4416-b273-f7833a7fddc8"
  ],
  "after": [
    "3f00dd4a-56f2-49c5-940c-69eed8a9fb5b"
  ]
}