InfiVoice Introduction API
InfiVoice provides a powerful REST API for automating AI-powered voice calls. Whether you're building customer outreach, appointment reminders, lead qualification, or interactive voice applications, our API gives you full control. --- Navigate to your InfiVoice dashboard → API Keys page (left sidebar, /app/api-keys) to create an API key. Keep this key secure—it provides full access to your account. Test your connection with a simple health check: ```bash curl -X GET "https://infivoice.com/api/v1/health" ``` Include your API key in every request using one of these methods: ```bash curl -H "Authorization: Bearer YOUR_API_KEY" ... curl -H "X-API-Key: YOUR_API_KEY" ... ``` --- | Concept | Description | |---------|-------------| | **Agents** | AI voice agents that handle conversations. Two types: Flow (visual conversation builder) and Incoming (for inbound calls). | | **Campaigns** | Bulk calling operations targeting multiple contacts with the same agent. | | **Calls** | Individual voice call records with transcripts, recordings, and analytics. | | **Contacts** | Your CRM leads with phone numbers, custom fields, and AI-enriched data. | | **Credits** | Billing units where 1 credit = 1 minute of call time. | | **Webhooks** | Real-time event notifications delivered to your endpoints. | --- InfiVoice supports three telephony engines for different use cases: | Engine | AI Provider | Best For | |--------|-------------|----------| | `elevenlabs` | ElevenLabs Conversational AI | High-quality voices, 29 languages | | `plivo` | OpenAI Realtime API | India and APAC regions | | `twilio-openai` | OpenAI Realtime API | Global coverage, reliable routing | --- All API endpoints (except `/health`) require authentication. Include your API key in every request: - **Authorization Header**: `Authorization: Bearer YOUR_API_KEY` - **X-API-Key Header**: `X-API-Key: YOUR_API_KEY` API keys have scoped permissions. Ensure your key has the required scopes for the endpoints you're accessing. --- Requests are rate-limited based on your subscription plan: | Plan | Limit | |------|-------| | Free | 60 requests/minute | | Pro | 300 requests/minute | | Enterprise | 1000 requests/minute | **Rate limit headers in responses:** - `X-RateLimit-Limit` — Maximum requests per window - `X-RateLimit-Remaining` — Remaining requests - `X-RateLimit-Reset` — Unix timestamp when window resets --- ```json { "success": true, "data": { ... }, "meta": { "requestId": "uuid", "timestamp": "2024-01-01T00:00:00.000Z" } } ``` ```json { "success": false, "error": { "code": "ERROR_CODE", "message": "Human readable message", "details": { ... } }, "meta": { ... } } ``` --- | Code | HTTP Status | Description | |------|-------------|-------------| | `VALIDATION_ERROR` | 400 | Invalid request parameters | | `UNAUTHORIZED` | 401 | Missing or invalid API key | | `FORBIDDEN` | 403 | Insufficient permissions | | `NOT_FOUND` | 404 | Resource not found | | `INSUFFICIENT_CREDITS` | 402 | Not enough credits | | `RATE_LIMIT_EXCEEDED` | 429 | Too many requests |