Base URL

All API requests should be made to:
https://api.authentivoice.com
For local development:
http://localhost:8006

Authentication

The AuthentiVoice API uses two forms of authentication:

1. API Key Authentication

Include your API key in the x-api-key header:
curl -X GET https://api.authentivoice.com/api/v1/analyses \
  -H "x-api-key: your_api_key_here"

2. JWT Bearer Token

For user-specific operations, include the Supabase JWT token:
curl -X GET https://api.authentivoice.com/api/v1/analyses \
  -H "Authorization: Bearer your_jwt_token_here" \
  -H "x-api-key: your_api_key_here"

Headers

Required Headers

x-api-key
string
required
Your AuthentiVoice API key for authentication

Optional Headers

Authorization
string
Bearer token for user authentication (required for user-specific operations)
x-orgid
string
Organization ID to scope requests (if not provided, uses user’s default org)

Request Format

JSON Requests

For POST, PUT, and PATCH requests with JSON payloads:
curl -X POST https://api.authentivoice.com/api/v1/analyses \
  -H "Content-Type: application/json" \
  -H "x-api-key: your_api_key_here" \
  -d '{
    "file_id": "123e4567-e89b-12d3-a456-426614174000",
    "file_name": "call_recording.mp3"
  }'

Multipart Form Data

For file uploads:
curl -X POST https://api.authentivoice.com/api/v1/audio/upload \
  -H "x-api-key: your_api_key_here" \
  -F "file=@/path/to/audio.mp3"

Response Format

All responses are returned in JSON format:

Success Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "success",
  "data": {
    // Response data
  }
}

Error Response

{
  "error": {
    "status": 400,
    "message": "Invalid request",
    "details": {
      "field": "file_name",
      "issue": "Required field missing"
    }
  }
}

Status Codes

Status CodeDescription
200Success - Request completed successfully
201Created - Resource created successfully
204No Content - Request successful, no content to return
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing authentication
403Forbidden - Insufficient permissions
404Not Found - Resource not found
413Payload Too Large - File size exceeds limit
422Unprocessable Entity - Validation error
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server error

Rate Limiting

API requests are rate limited to ensure service stability:
  • Default limit: 100 requests per minute
  • File upload limit: 10 uploads per minute
  • Bulk operations: 5 requests per minute
Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1641024000

Pagination

List endpoints support pagination using limit and offset parameters:
GET /api/v1/analyses?limit=20&offset=40
Response includes pagination metadata:
{
  "items": [...],
  "total": 150,
  "limit": 20,
  "offset": 40
}

Filtering and Sorting

Filtering

Use query parameters to filter results:
GET /api/v1/analyses?status=completed&fraud_score_min=0.7

Sorting

Use the sort parameter with field name and direction:
GET /api/v1/analyses?sort=created_at:desc

Webhooks

Configure webhooks to receive real-time notifications:
{
  "url": "https://your-app.com/webhook",
  "events": ["analysis.completed", "analysis.failed"],
  "secret": "your_webhook_secret"
}

API Versioning

The API version is included in the URL path:
  • Current version: v1
  • Base path: /api/v1/
Version changes will be communicated with adequate notice.

SDK Support

Official SDKs are available for:

JavaScript/TypeScript

npm install @authentivoice/sdk

Python

pip install authentivoice

SDK Example

import { AuthentiVoiceClient } from '@authentivoice/sdk';

const client = new AuthentiVoiceClient({
  apiKey: 'your_api_key_here',
  baseUrl: 'https://api.authentivoice.com'
});

// Create analysis
const analysis = await client.analyses.create({
  fileId: '123e4567-e89b-12d3-a456-426614174000',
  fileName: 'call_recording.mp3'
});

// Get analysis status
const status = await client.analyses.get(analysis.id);

Testing

Use the sandbox environment for testing:
  • Base URL: https://sandbox.api.authentivoice.com
  • Test API Key: test_key_xxxxxxxxxx
Sandbox limitations:
  • Files are deleted after 24 hours
  • Maximum 10 concurrent analyses
  • Limited to 1000 API calls per day

Support

For API support:

Next Steps