How authentication works

The APIs use portal credentials (email + portalApiKey) and dedicated headers on every business call. A second key level (assistantApiKey) protects single-assistant operations.

๐Ÿ”‘

Portal login

Call POST /api/v1/auth/portal/login passing email and portalApiKey to validate the customer credentials.

๐Ÿ“จ

Session headers

On every business request send the headers x-client-email and x-portal-api-key. All traffic flows over HTTPS/TLS.

๐Ÿค–

Per-assistant operations

To modify a single assistant use its assistantApiKey in the path: /api/v1/assistants/{assistantApiKey}/...

Functional areas exposed by the APIs

The APIs expose the entire AI4CALL platform. Each area maps to a Swagger tag group and is governed programmatically with the same logic as the graphical portal.

โš™๏ธ

Account & environment

Manage the customer's global setup: allowed IPs, call limits, number routing and active plugins.

  • /account/allowed-ips — IP whitelist (read/update)
  • /account/call-limits — Concurrent and periodic call limits
  • /account/number-routing — Number โ†’ assistant mapping
  • /account/plugins/* — Available plugins, instances, configurations and purchase
๐Ÿค–

Assistants & prompt

Full CRUD on AI assistants: create them, read details, update prompt, first message and settings.

  • GET/POST /assistants — List and create assistants
  • /assistants/{key} — Single assistant detail
  • /assistants/{key}/prompt — Editable prompt + first message
  • /runtime/settings — Runtime settings and advanced settings
๐ŸŽ™๏ธ

Voice: TTS, ASR, LLM, DTMF

Pick providers and models for text-to-speech, speech-to-text, LLM and DTMF, and apply them to the assistant on the fly.

  • /catalog/providers/tts + tts/voices
  • /catalog/providers/asr + asr/models
  • /catalog/providers/llm + llm/models
  • /runtime/{tts|asr|llm|dtmf} — Runtime update of TTS, ASR, LLM and DTMF
๐Ÿ“š

RAG & knowledge base

Upload documents, manage collections and bind knowledge bases to your assistants for always up-to-date answers.

  • /catalog/rag/collections — List RAG collections
  • /rag/collections/{name}/documents — Upload, list, delete documents
  • /rag/documents/estimate — Indexing cost estimate
  • /runtime/rag — Runtime RAG binding on the assistant
๐Ÿ”Œ

Tools & Pre-Call

Extend assistants with available tools and pre-call logic: number validation, MCP configuration and runtime tools.

  • /catalog/tools — Customer-side runtime tool catalog
  • /runtime/tools — Tools bound to a single assistant
  • /runtime/precall/number-validation
  • /runtime/precall/mcp-config
๐Ÿ“ด

Hangup & post-call

Define call-end behavior: redirect, transfer, conversation save and structured output schema.

  • /runtime/hangup — Hangup, redirect and transfer configuration
  • /runtime/hangup/save-conversation
  • /runtime/hangup/schema
  • Catalog of available hangup options
๐Ÿ“ž

Outbound & PBX

Trigger outbound calls from your backend, either via the AI4CALL trunk or via the customer's PBX, through simple webhooks.

  • POST /webhook/outbound_call — Outbound via AI4CALL trunk
  • POST /webhook/outbound_call_pbx — Outbound via customer PBX
  • Custom metadata pass-through (e.g. lead_id, ticket)
  • Outcome tracking via Analytics
๐Ÿ“Š

Analytics & history

Expose call history, top-ups, RAG, SMS and tool responses for your reporting and dashboards.

  • /account/analytics/calls + calls-outbound
  • /account/analytics/recharges
  • /account/analytics/rag ยท sms ยท tool-responses
  • /account/analytics/pre-call

Get started in 4 steps

From activation to your first API call in just a few minutes.

โœ…

Activate an account

Register your company on AI4CALL and pick the plan that best fits your use case.

๐Ÿ”

Generate a portalApiKey

From the portal create a dedicated key for each application or environment (test, production).

๐Ÿงญ

Explore Swagger

Open the interactive documentation, try endpoints and copy ready-made requests.

๐Ÿš€

Integrate & go live

Plug the APIs into your systems, configure outbound and analytics and monitor usage.

cURL examples

Three snippets covering the most common flow: login, list assistants, trigger outbound.

1. Portal login

curl -X POST https://client-api.ai4call.com/api/v1/auth/portal/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "demo@ai4call.local",
    "portalApiKey": "portal_demo_key_123456789"
  }'

2. List the customer's assistants

curl -X GET https://client-api.ai4call.com/api/v1/assistants \
  -H "x-client-email: demo@ai4call.local" \
  -H "x-portal-api-key: portal_demo_key_123456789"

3. Trigger an outbound call

curl -X POST https://client-api.ai4call.com/webhook/outbound_call \
  -H "x-client-email: demo@ai4call.local" \
  -H "x-portal-api-key: portal_demo_key_123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "assistantApiKey": "ast_xxx",
    "to": "+39081...",
    "from": "+3902...",
    "metadata": { "lead_id": "123" }
  }'

All endpoints are documented in Swagger with sample request/response, error codes and JSON schemas. The headers x-client-email and x-portal-api-key are required on every business call.

Integration scenarios

AI4CALL APIs fit both core business software and low-code automated workflows.

๐Ÿข

CRM / ERP integration

Sync leads, tickets and activities with your business software and trigger AI calls directly from your CRM.

โš™๏ธ

Internal automations

Orchestrate outbound campaigns, appointment confirmations, callbacks and automatic surveys via webhook.

๐Ÿ“ˆ

Advanced reporting

Bring AI4CALL data into your data warehouse or BI tools (Power BI, Looker, Metabase).

๐Ÿ”„

No-code workflows

Connect AI4CALL to tools like n8n, Zapier or Make to automate flows without writing code.

๐Ÿ› ๏ธ

Custom tools & plugins

Expose your business functions as tools that assistants can invoke during calls.

๐Ÿ“ฆ

Multi-tenant & resellers

Build multi-customer portals and dashboards on top of the APIs, with data isolation and branding.

Security, reliability and compliance

The APIs are designed for production environments: secure, monitored and versioned.

๐Ÿ”

Two-level authentication

Headers x-client-email + x-portal-api-key for the customer, assistantApiKey in the path for single-assistant operations. Everything over HTTPS/TLS.

๐ŸŒ

IP whitelist

Restrict API usage to a list of authorized IPs, managed via /account/allowed-ips.

โฑ๏ธ

Limits & quotas

Dedicated /account/call-limits endpoint to read and update call limits, without exceeding contracted capacity.

๐Ÿ“œ

Stable versioning

All business endpoints sit under /api/v1/. Breaking changes will be introduced with a new major version.

Interactive Swagger documentation

Explore each endpoint, try requests live, download the openapi.yaml spec and generate clients in your favorite language.

Go to swagger.ai4call.com

The API is documented following the OpenAPI 3.0.3 standard and is browsable through the Swagger UI at https://swagger.ai4call.com/. You can download the openapi.yaml file directly from the same page.

The production base URL is https://client-api.ai4call.com. All business endpoints sit under /api/v1/, while outbound calls use the /webhook/ prefix.

Start with POST /api/v1/auth/portal/login passing email and portalApiKey. Then every business request must include the headers x-client-email and x-portal-api-key. Single-assistant operations also require the assistantApiKey in the path.

Yes. GET/POST /api/v1/assistants allows listing and creating, GET /api/v1/assistants/{assistantApiKey} the detail. The Assistants tag in Swagger groups all available operations.

Yes, through GET and PATCH on /api/v1/assistants/{assistantApiKey}/prompt. It is designed for programmatic editing of prompt and first message without using the portal.

For each available provider/voice/model there is a catalog endpoint (e.g. /api/v1/catalog/providers/tts, /catalog/assistants/{key}/asr/models) and a runtime assignment endpoint (PATCH /api/v1/assistants/{assistantApiKey}/runtime/{tts|asr|llm|dtmf}).

RAG collections live under /api/v1/catalog/rag/: list collections, upload and delete documents, get an indexing cost estimate, and bind to the assistant with PATCH /assistants/{key}/runtime/rag.

Yes. GET /api/v1/catalog/tools returns the available tools, while /catalog/assistants/{key}/tools and PATCH /assistants/{key}/runtime/tools allow assigning tools to a single assistant.

Under /api/v1/assistants/{key}/runtime/precall/ you can configure number-validation and mcp-config. /catalog/assistants/{key}/pre-call exposes the available options.

Use PATCH /assistants/{key}/runtime/hangup for redirect/transfer, /runtime/hangup/save-conversation to save the conversation, and /runtime/hangup/schema to define a structured output data schema.

Through POST /webhook/outbound_call (AI4CALL trunk) or POST /webhook/outbound_call_pbx (customer PBX). In both cases you specify the assistant, the number to dial and any custom metadata.

Under /api/v1/account/analytics/ you find inbound and outbound call history, top-ups, RAG events, SMS, tool responses and pre-call. They are designed to be ingested by BI or data warehouses.

Yes. GET/PATCH /api/v1/account/allowed-ips lets you read and update the whitelist of IPs allowed to authenticate and use the APIs.

Through GET/PATCH /api/v1/account/call-limits you can read and update limits such as concurrent or periodic calls, depending on the subscribed plan.

Yes. You can list available plugins (/account/plugins/available), manage instances (/account/plugins/instances), update configuration (/account/plugins/configuration) and finalize purchases (PATCH /account/plugins/purchase).

Yes, GET /health returns the service status. It does not require authentication and is useful for monitoring and automated probes.

All business endpoints sit under the /api/v1/ prefix. Any non-backward-compatible changes will be introduced as /api/v2/, keeping v1 active during the transition period.

You can use credentials (email + portalApiKey) dedicated to test environments, isolating configurations and numbers from production calls. Reach out from the portal to enable a test account.

Technology and people:
together, zero waiting and a thousand solutions.

Ready to transform
your calls?

Request a free demo and discover how AI4CALL can revolutionize your business


Some of the ai4call users