Skip to main content
GET
/
v1
/
retrieve-call-logs
/
{agent_id}
Retrieve Call Logs
curl --request GET \
  --url https://api.getbluejay.ai/v1/retrieve-call-logs/{agent_id} \
  --header 'X-API-Key: <x-api-key>'
{
  "total_count": 123,
  "page": 123,
  "page_size": 123,
  "total_pages": 123,
  "call_logs": [
    {
      "id": "<string>",
      "agent_id": "<string>",
      "recording_url": "<string>",
      "start_time_utc": "<string>",
      "participants": [
        {
          "role": "AGENT",
          "spoke_first": true,
          "name": "<string>",
          "phone_number": "<string>"
        }
      ],
      "status": "INITIALIZING",
      "external_agent_id": "<string>",
      "call_direction": "INBOUND",
      "interface": "PHONE",
      "created_at": "2023-11-07T05:31:56Z",
      "transcript_url": "<string>",
      "tool_calls": [
        {
          "name": "<string>",
          "start_offset_ms": 1,
          "description": "<string>",
          "parameters": {},
          "output": "<unknown>"
        }
      ],
      "events": [
        {
          "title": "<string>",
          "start_offset_ms": 123,
          "description": "<string>",
          "end_offset_ms": 123,
          "tags": [
            "<string>"
          ],
          "metadata": {}
        }
      ],
      "tags": [
        "<string>"
      ],
      "duration_ms": 0,
      "evaluations": [
        {
          "agent_speak_percentage": 123,
          "avg_agent_latency": 123,
          "id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "hallucination": true,
          "hallucination_reasoning": "<string>",
          "redundancy": true,
          "redundancy_reasoning": "<string>",
          "latency": {
            "avg_agent_latency": 0,
            "max_agent_latency": 0,
            "p50_agent_latency": 0,
            "p90_agent_latency": 0,
            "p95_agent_latency": 0,
            "p99_agent_latency": 0
          },
          "filler_ignored_latency": {
            "avg_filler_ignored_latency": 0,
            "p50_filler_ignored_latency": 0,
            "p90_filler_ignored_latency": 0,
            "p95_filler_ignored_latency": 0,
            "p99_filler_ignored_latency": 0
          },
          "num_turns": 123,
          "call_summary": "<string>",
          "custom_evals": [
            "<unknown>"
          ],
          "custom_evals_success_rate": 123,
          "goal_success": true,
          "goal_reasoning": "<string>",
          "pronunciation_score": 123,
          "pronunciation_reasoning": "<string>",
          "sentiment_label": "<string>",
          "sentiment_score": 123,
          "sentiment_scores": {},
          "custom_metrics": [
            {
              "name": "<string>",
              "description": "<string>",
              "response_type": "<string>",
              "response_value": "<string>",
              "reasoning": "<string>",
              "min_value": 123,
              "max_value": 123,
              "category": "<string>",
              "tags": [
                "<string>"
              ],
              "scoring_guidance": "<string>",
              "enum_options": [
                "<string>"
              ]
            }
          ]
        }
      ],
      "annotations": [
        "<unknown>"
      ],
      "metadata": {},
      "custom_metrics": [
        "<unknown>"
      ],
      "conversation_ended_by": "AGENT"
    }
  ]
}
Integration Prompt for AI Agents
# Bluejay — Testing & Monitoring Platform for Conversational AI Agents

You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.

## Retrieve Call Logs — GET /v1/retrieve-call-logs/{agent_id}

> **What this endpoint does:** Retrieve call logs for a specific agent given the agent ID. Returns a list of call objects, each with an additional "evaluations" field containing a list of evaluations joined via call_id.

**Endpoint:** GET `https://api.getbluejay.ai/v1/retrieve-call-logs/{agent_id}`
**Auth:** `X-API-Key` header

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| agent_id | string |  |
| X-API-Key | string | API key required to authenticate requests. |

Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/retrieve-call-logs and include any optional parameters (e.g., `label`, `page_size`, `page`, `last`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.

### Example
**Simple GET:**
```python
import requests

def retrieve_call_logs(agent_id: str, api_key: str) -> dict:
    url = f"https://api.getbluejay.ai/v1/retrieve-call-logs/{agent_id}"
    headers = {"X-API-Key": api_key}
    response = requests.get(url, headers=headers)
    response.raise_for_status()
    return response.json()
```

### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.

### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?

Then implement the integration, export it, and confirm it compiles/passes lint.
Retrieves the call logs for a specific agent identified by agent_id. This endpoint returns detailed information about each call, including evaluations, hallucinations, redundancy, and custom evaluation metrics.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

agent_id
string
required

Query Parameters

label
string | null

Label of the agent to filter by

page_size
integer
default:20

Max calls per page

Required range: 1 <= x <= 100
page
integer
default:1

Page number (1-based)

Required range: x >= 1
last
enum<string>
default:1day

Last X days to filter by

Available options:
1day,
3days,
7days,
30days,
90days,
all

Response

Successful Response

total_count
integer
required

Total number of calls for this agent

page
integer
required

Current page (1-based)

page_size
integer
required

Page size

total_pages
integer
required

Total number of pages

call_logs
CallLog · object[]

List of calls retrieved from the database