POST
/
v1
/
analyze
{
  "404": {},
  "409": {},
  "503": {},
  "analysisId": "<string>",
  "status": "<string>",
  "estimatedCompletion": "<string>",
  "queuePosition": 123
}

Analyze Audio

Initiate comprehensive fraud analysis on an uploaded audio file, including transcription and AI-powered fraud detection.

Request

fileId
string
required
The ID of the audio file to analyze
options
object
Analysis options
webhookUrl
string
URL to receive completion notification

Response

analysisId
string
Unique identifier for the analysis
status
string
Analysis status: queued, processing, completed, failed
estimatedCompletion
string
Estimated completion time (ISO 8601)
queuePosition
integer
Position in processing queue

Examples

curl -X POST https://api.authentivoice.com/v1/analyze \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fileId": "file_0987654321fedcba",
    "options": {
      "transcriptionEngine": "whisper",
      "language": "en",
      "fraudDetection": {
        "sensitivity": "high",
        "focusAreas": ["financial", "identity"]
      }
    },
    "webhookUrl": "https://your-app.com/webhook/analysis-complete"
  }'

Response Example

{
  "analysisId": "ana_1234567890abcdef",
  "status": "processing",
  "estimatedCompletion": "2024-01-15T10:35:00Z",
  "queuePosition": 3
}

Webhook Payload

When analysis completes, a POST request is sent to your webhook URL:
{
  "event": "analysis.completed",
  "timestamp": "2024-01-15T10:34:30Z",
  "analysisId": "ana_1234567890abcdef",
  "status": "completed",
  "results": {
    "riskScore": 75,
    "fraudIndicators": [
      {
        "type": "urgency_language",
        "confidence": 0.85,
        "timestamp": "00:45-01:20"
      },
      {
        "type": "personal_info_request",
        "confidence": 0.92,
        "timestamp": "02:15-02:45"
      }
    ],
    "transcription": {
      "text": "Full transcription text...",
      "confidence": 0.95,
      "language": "en"
    }
  }
}

Error Responses

404
Not Found
File not found
{
  "error": {
    "code": "FILE_NOT_FOUND",
    "message": "The specified audio file was not found"
  }
}
409
Conflict
Analysis already in progress
{
  "error": {
    "code": "ANALYSIS_IN_PROGRESS",
    "message": "Analysis is already in progress for this file",
    "analysisId": "ana_existing123"
  }
}
503
Service Unavailable
Processing queue full
{
  "error": {
    "code": "QUEUE_FULL",
    "message": "Processing queue is full. Please try again later.",
    "retryAfter": 300
  }
}