API Reference
Batch Call Upload

Batch Upload API

Upload multiple historical call recordings to Aila in a single asynchronous batch request (supports 1 to 100 recordings per batch).


Endpoint Specification

POST https://app.aila.fyi/api/v1/calls/upload/batch
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json

Request Body Schema

FieldTypeRequiredDescription
callsArrayYesArray of 1 to 100 call objects.
calls[].audio_urlString (URL)YesPublicly accessible URL of the audio file.
calls[].recorded_atString (ISO 8601)YesTimestamp when the call occurred.
calls[].agent_nameStringYesName of the team member on the call.
calls[].agent_emailString (Email)YesEmail address of the assigned agent.
calls[].contact_nameStringNoCustomer or lead name.
calls[].contact_phoneStringNoCustomer phone number in E.164 format.
calls[].durationIntegerNoCall length in seconds.
calls[].external_idStringNoID from your dialer or telephony system.
calls[].tagsArray<string>NoUp to 10 metadata tags.
calls[].metadataObjectNoKey-value dictionary of custom metadata.

Example Request

{
  "calls": [
    {
      "audio_url": "https://storage.example.com/recordings/call_001.mp3",
      "recorded_at": "2026-08-24T14:30:00Z",
      "agent_name": "Sarah Connor",
      "agent_email": "sarah@company.com",
      "contact_name": "John Smith",
      "contact_phone": "+15551234567",
      "external_id": "dialer_rec_987"
    }
  ]
}

Response Schema

{
  "success": true,
  "data": {
    "batch_id": "batch_abc123",
    "total_calls": 1,
    "status": "queued",
    "calls": [
      {
        "call_id": "call_xyz789",
        "external_id": "dialer_rec_987",
        "status": "queued"
      }
    ],
    "status_url": "https://app.aila.fyi/api/v1/batches/batch_abc123"
  }
}

Polling Batch Status

Query batch progress using the status URL:

GET https://app.aila.fyi/api/v1/batches/{batch_id}
Authorization: Bearer <YOUR_API_KEY>

Batch Status Response

{
  "success": true,
  "data": {
    "batch_id": "batch_abc123",
    "total_calls": 10,
    "processed": 8,
    "failed": 0,
    "in_progress": 2,
    "status": "processing",
    "progress_percentage": 80
  }
}