Documentation

Integrations API

Connect external services to your agents so they can take real actions during a call — look up data from your own APIs, book meetings, or trigger workflows. Create an integration once, then attach it to any agent. All endpoints require Authorization: Bearer YOUR_JWT from login.

Integration types

Custom API

Call any HTTP endpoint you own. The agent can pass parameters it collects during the conversation (e.g. an order ID) and use the response in its reply.

Cal.com

Let the agent schedule meetings on your Cal.com calendar in real time using your Cal API key and event type.

List integrations

Returns the integrations in your workspace as data.integrations. Use each integration's id to attach it to an agent.

cURL
curl -X GET "https://bkbharatai.blutec.ai/api/integrations" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json"

Create a Custom API integration

Register an HTTP endpoint the agent can call mid-conversation. Use query parameters for GET and body parameters for POST/PUT. Mark a parameter with isLLMGenerated: true so the agent fills it from what the caller says. The description is required — the agent uses it to decide when to call the API.

name
stringrequired

A label for the integration.

description
stringrequired

Tells the LLM when to use this integration (min 10 characters).

url
stringrequired

The endpoint the agent calls.

method
stringoptional

HTTP method — GET, POST, PUT, or DELETE. Defaults to GET.

headers
arrayoptional

List of { key, value } objects sent with every request (e.g. auth headers).

query_params
arrayoptional

Query string parameters: { key, description, type, required, isLLMGenerated }.

body_params
arrayoptional

JSON body parameters for POST/PUT, same shape as query params.

body_type
stringoptional

Usually json for POST/PUT.

cURL
curl -X POST "https://bkbharatai.blutec.ai/api/integrations/custom-api" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Order Lookup",
    "description": "Fetch order status by order ID when the caller asks about an order",
    "url": "https://api.yourcompany.com/orders",
    "method": "POST",
    "headers": [
      { "key": "x-api-key", "value": "YOUR_SERVICE_KEY" }
    ],
    "query_params": [],
    "body_type": "json",
    "body_params": [
      {
        "key": "order_id",
        "description": "The customer order ID to look up",
        "type": "string",
        "required": true,
        "isLLMGenerated": true
      }
    ]
  }'

Create a Cal.com integration

Connect a Cal.com event type so the agent can book meetings during the call.

cal_api_key
stringrequired

Your Cal.com API key.

cal_id
stringrequired

The Cal.com event type ID to book against.

cal_timezone
stringoptional

Timezone for scheduling. Defaults to America/New_York.

name
stringoptional

A label for the integration.

description
stringoptional

Tells the LLM when to offer scheduling.

cURL
curl -X POST "https://bkbharatai.blutec.ai/api/integrations/cal" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Book a Demo",
    "description": "Schedule meetings during the call",
    "cal_api_key": "cal_live_xxx",
    "cal_id": "your-event-type-id",
    "cal_timezone": "America/New_York"
  }'

Attach an integration to an agent

An integration only runs once it is attached to an agent. Use the integration's id from the list endpoint.

cURL
curl -X POST "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{ "integration_id": 123 }'

List an agent's integrations

cURL
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json"

Detach an integration

cURL
curl -X DELETE "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations/INTEGRATION_ID" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json"

Related