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

API key from RubricHQ Settings → API Keys. Send it as: Authorization: Bearer <YOUR_API_KEY>.

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_idintegerOptional

Optional. RubricHQ client (workspace) ID. Defaults to the workspace your API key belongs to.

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").
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. e.g. 978-987-9876

duration_secondsintegerOptional
Optional. Total call duration in seconds.
call_timestampdatetimeOptional

Optional. When the call occurred (ISO 8601) in your system. Defaults to the time the call was added in our system 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. Every metric that runs consumes credits from your workspace balance.
metadatamap from strings to anyOptional

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

Response

Call accepted for analysis
idintegerOptional
Internal RubricHQ call ID.
call_identifierstringOptional
Your provided call identifier.
analysis_statusenumOptional
  • 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