Getting Started
Create an API key, authenticate your first request, and start building with JagCall in under five minutes.
1
Create an API Key
- Log in to your JagCall dashboard.
- Navigate to Settings → API Keys.
- Click Create API Key.
- Give it a descriptive name (e.g., "Backend Server").
- Copy the key immediately — it will not be shown again.
Keep your API key secret. Do not commit it to version control or expose it in client-side code. Use environment variables in production.
2
Authenticate Requests
Include your API key as a Bearer token in the Authorization header of every request:
Authorization: Bearer jc_live_abc123...
Base URL: https://jagcall.com/v1/
3
Make Your First Call
List all agents on your account to verify everything works.
curl
curl -X GET https://jagcall.com/v1/agents \
-H "Authorization: Bearer jc_live_abc123..." \
-H "Content-Type: application/json"python
import requests
API_KEY = "jc_live_abc123..."
BASE_URL = "https://jagcall.com/v1"
response = requests.get(
f"{BASE_URL}/agents",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
)
agents = response.json()
for agent in agents["data"]:
print(f"{agent['name']} ({agent['id']})")node.js
const API_KEY = "jc_live_abc123...";
const BASE_URL = "https://jagcall.com/v1";
const response = await fetch(`${BASE_URL}/agents`, {
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
});
const { data: agents } = await response.json();
agents.forEach((agent) => {
console.log(`${agent.name} (${agent.id})`);
});Rate Limiting
Rate limits vary by endpoint to ensure fair usage. When you exceed a limit, the API returns 429 Too Many Requests with a Retry-After header.
| Endpoint | Limit |
|---|---|
| GET /v1/agents | 200/min |
| POST /v1/calls | 60/min |
| POST /v1/sms | 120/min |
| GET /v1/calls/:id/transcript | 100/min |
| POST /v1/agents | 30/min |
| GET /v1/billing/balance | 60/min |
| POST /v1/phone-numbers/search | 10/min |
Error Responses
All errors follow a consistent JSON format with an error code, human-readable message, and HTTP status.
json
{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked.",
"status": 401
}
}| Status | Meaning |
|---|---|
| 400 | Bad request -- invalid parameters |
| 401 | Unauthorized -- missing or invalid API key |
| 403 | Forbidden -- insufficient permissions |
| 404 | Not found -- resource does not exist |
| 422 | Unprocessable entity -- validation error |
| 429 | Too many requests -- rate limit exceeded |
| 500 | Internal server error -- contact support |