Add Calls

Submit a call recording and/or transcript for analysis. At least one of recording_url or transcript is required.

The response returns immediately with analysis_status: "pending". Poll GET /calls/{id} to check when analysis is complete.

Authentication

AuthorizationBearer

JWT token from RubricHQ Settings → API Keys

Request

This endpoint expects an object.
call_identifierstringRequired
Required. Your unique ID for this call. Used for deduplication and retrieval.
agent_idintegerRequired
Required. RubricHQ agent ID to associate with this call.
client_idintegerRequired

Required. RubricHQ client (workspace) ID.

recording_urlstringOptionalformat: "uri"

Publicly accessible URL to the audio recording (WAV, MP3, or M4A). Required if no transcript is provided. RubricHQ will download and store this securely. Needed for audio-based metrics (latency, interruptions, silence, WPM). Omit it for text-only calls — audio analysis simply won’t run.

transcriptlist of objectsOptional

The conversation as an ordered list of turns. Required if no recording_url is provided. Each turn is an object:

FieldTypeDescription
rolestringOne of "AI Assistant", "User", "Function Call", or "Function Call Result".
contentstringWhat was said in this turn. Empty for tool-call turns.
start_timenumberSeconds from the start of the call when the turn began.
end_timenumberSeconds from the start of the call when the turn ended.
dataobjectOnly on tool-call turns. Carries id, name, and arguments (on "Function Call") or result (on "Function Call Result").

If provided alongside a recording_url, transcript-based metrics run immediately while audio metrics run asynchronously.

call_directionenumOptionalDefaults to inbound

Optional (defaults to inbound). Whether the call was initiated by the agent (outbound) or the customer (inbound).

call_end_reasonstringOptional

Optional. How the call ended (e.g. completed, dropped, transferred).

customer_numberstringOptional
Optional. Customer phone number.
duration_secondsintegerOptional
Optional. Total call duration in seconds.
call_timestampdatetimeOptional

Optional. When the call occurred (ISO 8601). Defaults to ingestion time if omitted.

labelstringOptional

Optional. Free-text label for this call (visible in the dashboard).

metric_idslist of integersOptional
Optional. IDs of specific metrics to compute. Defaults to all enabled metrics for the agent.
metadatamap from strings to anyOptional

Optional. Arbitrary key-value pairs stored with the call (visible in the dashboard).

Response

Call accepted for analysis
idinteger
Internal RubricHQ call ID.
call_identifierstring
Your provided call identifier.
analysis_statusenum
  • pending — analysis queued or in progress
  • computed — all metrics computed successfully
  • failed — analysis encountered an error

Errors

404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error