Developer Documentation
Build integrations and automate workflows with our REST API and SDKs.
Table of Contents
Getting Started
CallFlow's API enables seamless integration with your call center workflows. You'll need an API key to authenticate requests.
First, create an account and access your API key from the dashboard.
API Reference
Endpoints
Initiate a Call
Start a new outbound call session with specified parameters.
"to": "1234567890",
"from": "0987654321",
"campaign_id": "camp_123abc"
}
Get Call Analytics
Retrieve metrics and performance data for your call campaigns.
"campaign_id": "camp_123abc",
"start_date": "2025-09-01",
"end_date": "2025-09-30"
}
Response Status Codes
Success
Request was successful
Bad Request
Invalid request format
Unauthorized
Missing or invalid authentication
Not Found
Requested resource does not exist
Authentication
All API requests must be authenticated with an API key. Include it in the Authorization header:
Authorization: Bearer YOUR_API_KEY
How to Get an API Key
- Log in to your CallFlow account
- Navigate to API settings in the dashboard
- Generate a new API key with desired permissions
- Use the key in your authenticated requests
⚠️ Store your API key securely—never expose it in client-side code or public repositories.
Code Examples
Node.js Example
const axios = require('axios'); axios.post('https://api.callflow.com/api/v1/call', { to: '+1234567890', from: '+0987654321', campaign_id: 'camp_123abc' }, { headers: { Authorization: `Bearer YOUR_API_KEY`, 'Content-Type': 'application/json' } }) .then(response => { console.log('Call initiated:', response.data); }) .catch(error => { console.error('Error initiating call:', error.response?.data || error.message); });
Python Example
import requests url = "https://api.callflow.com/api/v1/call" payload = { "to": "+1234567890", "from": "+0987654321", "campaign_id": "camp_123abc" } headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print("Response status code:", response.status_code) print("Response body:", response.json())