Skip to main content
The audio endpoints handle interview recording in three steps: uploading chunks in real time, finalizing the chunks into a single file, and then transcribing or summarizing the result.
Audio recording is typically handled by the Credentials Portal web app. These endpoints are documented for advanced integrations.

Upload an audio chunk

POST /api/audio/capture
Uploads a chunk of audio data. Audio is recorded in chunks to support long recordings. Form data:
FieldTypeDescription
audiofileThe audio chunk (WebM or supported format)
recordingIdstringUnique ID for this recording session
chunkNumberintegerSequential chunk number (starting at 1)
Example:
curl -X POST https://app.credentialsportal.com/api/audio/capture \
  -H "Authorization: Bearer ck_your_api_key" \
  -F "audio=@chunk-001.webm" \
  -F "recordingId=rec-abc123" \
  -F "chunkNumber=1"
Response:
{ "ok": true, "chunk": 1 }

Finalize a recording

POST /api/audio/finalize
Combines all uploaded chunks into a single audio file, stores it in the district’s file storage, and attaches it to the interview record. Request body:
recordingId
string
required
The recording session ID used when uploading chunks.
personId
string
required
The person (candidate) ID this recording belongs to.
interviewId
string
required
The interview record ID to attach the audio to.
name
object
required
Display name for the recording: { "en": "Interview recording" }
Example:
curl -X POST https://app.credentialsportal.com/api/audio/finalize \
  -H "Authorization: Bearer ck_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "recordingId": "rec-abc123",
    "personId": "abc12",
    "interviewId": "int01",
    "name": { "en": "Board interview recording" }
  }'
Response:
{
  "ok": true,
  "recordingId": "rec-abc123",
  "url": "https://app.credentialsportal.com/files/xyz99/audio/abc12/rec-abc123.webm"
}

Transcribe audio

POST /api/audio/transcribe
Transcribes audio using AI speech-to-text (Whisper). Language is detected automatically. Request body:
url
string
required
The URL of the audio file to transcribe (must be accessible to the server).
personId
string
required
The person ID (used to store the transcript on the interview record).
interviewId
string
required
The interview ID to store the transcript on.
recordingId
string
required
The recording ID to store the transcript under.
Response:
{
  "ok": true,
  "transcript": "The candidate began by sharing their calling to ministry..."
}

Summarize a transcript

POST /api/audio/summarize
Generates an AI summary of a transcript. Request body:
transcript
string
required
The full transcript text to summarize.
personId
string
required
The person ID.
interviewId
string
required
The interview ID to store the summary on.
recordingId
string
required
The recording ID to store the summary under.
Response:
{
  "ok": true,
  "summary": "The candidate demonstrated strong theological knowledge and a clear sense of calling. The committee noted areas for growth in pastoral care and public communication."
}