Skip to main content
POST
/
recordings
/
{id}
/
upload-complete
curl -X POST https://api.bota.dev/v1/recordings/rec_abc123/upload-complete \
  -H "Authorization: Bearer sk_live_..."
{
  "id": "rec_abc123",
  "device_id": "dev_abc123",
  "end_user_id": "eu_xyz789",
  "status": "uploaded",
  "duration_ms": 1800000,
  "file_size_bytes": 2048576,
  "mime_type": "audio/wav",
  "started_at": "2025-01-15T09:00:00Z",
  "ended_at": "2025-01-15T09:30:00Z",
  "transcription_id": null,
  "metadata": {
    "meeting_type": "interview"
  },
  "created_at": "2025-01-15T10:00:00Z",
  "uploaded_at": "2025-01-15T10:05:00Z"
}
Mark the recording upload as complete after successfully uploading the audio file to S3. This transitions the recording status from pending to uploaded.
id
string
required
The recording’s unique identifier (e.g., rec_abc123).
curl -X POST https://api.bota.dev/v1/recordings/rec_abc123/upload-complete \
  -H "Authorization: Bearer sk_live_..."
{
  "id": "rec_abc123",
  "device_id": "dev_abc123",
  "end_user_id": "eu_xyz789",
  "status": "uploaded",
  "duration_ms": 1800000,
  "file_size_bytes": 2048576,
  "mime_type": "audio/wav",
  "started_at": "2025-01-15T09:00:00Z",
  "ended_at": "2025-01-15T09:30:00Z",
  "transcription_id": null,
  "metadata": {
    "meeting_type": "interview"
  },
  "created_at": "2025-01-15T10:00:00Z",
  "uploaded_at": "2025-01-15T10:05:00Z"
}

Complete Upload Flow

// 1. Create recording
const recording = await createRecording({ device_id: 'dev_abc123' });

// 2. Get upload URL
const { upload_url } = await getUploadUrl(recording.id, {
  content_type: 'audio/wav',
});

// 3. Upload to S3
await fetch(upload_url, {
  method: 'PUT',
  headers: { 'Content-Type': 'audio/wav' },
  body: audioBuffer,
});

// 4. Mark complete
const updated = await completeUpload(recording.id);
console.log(updated.status); // 'uploaded'

// 5. Now ready for transcription
const transcription = await transcribe(recording.id);
The recording must be in pending status. Calling this on an already-uploaded recording returns a 400 error.