Skip to main content

Calls

Use Calls endpoints for web/widget and outbound phone operations.

Authentication & scope

  • Header: X-API-Key: YOUR_API_KEY
  • Read operations: calls:read
  • Write operations: calls:write
  • Interactive testing: use API Reference page for endpoint-level Try it.

GET /v1/calls

Lists calls for your organization.

Bash

curl -X GET "https://api.indigenius.ai/v1/calls" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const response = await fetch('https://api.indigenius.ai/v1/calls', {
  headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
});
console.log(await response.json());

Python

import requests
response = requests.get(
    "https://api.indigenius.ai/v1/calls",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

200 OK

{
  "status": true,
  "message": "Calls fetched",
  "data": [
    {
      "id": "665e4a34c65bb95f2f2d72e1",
      "type": "web",
      "status": 1
    }
  ]
}

Common status codes

  • 200 success
  • 403 missing calls:read scope
  • 500 server error

POST /v1/calls/initiate

Creates a web/widget call session. Body is DTO-accurate to InitiateCallDto.

Bash

curl -X POST "https://api.indigenius.ai/v1/calls/initiate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assistantId": "665e4a34c65bb95f2f2d72e2",
    "type": "web"
  }'

Node

const response = await fetch('https://api.indigenius.ai/v1/calls/initiate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.INDIGENIUS_API_KEY,
  },
  body: JSON.stringify({
    assistantId: '665e4a34c65bb95f2f2d72e2',
    type: 'web',
  }),
});
console.log(await response.json());

Python

import requests
payload = {
    "assistantId": "665e4a34c65bb95f2f2d72e2",
    "type": "web",
}
response = requests.post(
    "https://api.indigenius.ai/v1/calls/initiate",
    headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

201 Created

{
  "status": true,
  "message": "Call initiated with location data",
  "callId": "665e4a34c65bb95f2f2d72e1",
  "gateway": {
    "transport": "websocket",
    "path": "/new-web-call/connection",
    "url": "wss://api.indigenius.ai/new-web-call/connection?assistant_id=665e4a34c65bb95f2f2d72e2&call_id=665e4a34c65bb95f2f2d72e1"
  }
}

Common status codes

  • 201 session created
  • 400 invalid payload or unsupported type flow
  • 403 missing calls:write scope
  • 500 server error

POST /v1/calls/phone/initiate

Initiates an outbound phone call. Body is DTO-accurate to InitiatePhoneCallDto.

Bash

curl -X POST "https://api.indigenius.ai/v1/calls/phone/initiate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_purchase_id": "665e4a34c65bb95f2f2d72e1",
    "phoneNumber": "+14155552671",
    "provider": "twilio"
  }'

Node

const response = await fetch(
  'https://api.indigenius.ai/v1/calls/phone/initiate',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.INDIGENIUS_API_KEY,
    },
    body: JSON.stringify({
      phone_purchase_id: '665e4a34c65bb95f2f2d72e1',
      phoneNumber: '+14155552671',
      provider: 'twilio',
    }),
  },
);
console.log(await response.json());

Python

import requests
payload = {
    "phone_purchase_id": "665e4a34c65bb95f2f2d72e1",
    "phoneNumber": "+14155552671",
    "provider": "twilio",
}
response = requests.post(
    "https://api.indigenius.ai/v1/calls/phone/initiate",
    headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

Common status codes

  • 201 call initiated
  • 400 invalid payload
  • 403 missing calls:write scope
  • 404 phone purchase not found
  • 500 server error

GET /v1/calls/{id}, GET /v1/calls/{id}/transcripts, GET /v1/calls/{id}/analysis

Use these read endpoints to retrieve details, transcript, and analysis.

Bash

curl -X GET "https://api.indigenius.ai/v1/calls/665e4a34c65bb95f2f2d72e1/transcripts" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const callId = '665e4a34c65bb95f2f2d72e1';
const response = await fetch(
  `https://api.indigenius.ai/v1/calls/${callId}/analysis`,
  {
    headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
  },
);
console.log(await response.json());

Python

import requests
call_id = "665e4a34c65bb95f2f2d72e1"
response = requests.get(
    f"https://api.indigenius.ai/v1/calls/{call_id}",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

Common status codes

  • 200 success
  • 403 missing calls:read scope
  • 404 call not found
  • 500 server error