Skip to main content
Get Logs
curl --request GET \
  --url https://api.agents.timepay.ai/api/v1/logs \
  --header 'Authorization: <authorization>'
{
  "success": true,
  "data": [
    {
      "call_id": "KjbdfYCefvutafHGCDhgfhgafhdyfyg",
      "date": "2026-01-17",
      "start_time": "2026-01-17T08:33:36",
      "end_time": "2026-01-17T08:35:08",
      "campaign_name": "August EMI Reminder Campaign",
      "campaign_id": "LKsfiGVdygfvYFGCdygayhf",
      "name": "John Wick",
      "loan_id": "LOAN-ABC-123",
      "duration": 14,
      "direction": "outbound",
      "from": "+918888888888",
      "to": "9999999999",
      "status": "No Contact",
      "disposition": "Voicemail",
      "transcript_id": "7437557f-7ab9-4012-b411-a6f534c5aaf0",
      "recording_id": "9242c009-1f8f-4bd6-a40c-e40926d1fd88",
      "extracted_data": {},
      "summary": "Customer acknowledged the pending EMI of ₹12,500 due on August 15 and promised to deposit the amount by tomorrow.",
      "agent_id": "lGJVyhgvayGDtfsfdfdf",
      "disposition_id": "YefgTYRCdygdygw",
      "type": "call"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 2450,
    "total_pages": 245,
    "has_next": true,
    "has_prev": false
  }
}

Headers

Authorization
string
required
Bearer token for authentication (e.g., Bearer <your_token>).

Query Parameters

type
string
Filter by communication type.
status
string
Filter by log status (e.g., No Contact, Completed, Failed).
disposition
string
Filter by call disposition (e.g., Voicemail, Promise to Pay, Not Interested).
from_phone
string
Filter by caller/sender phone number (e.g., +918035450808).
phone
string
Filter by customer phone number (e.g., 8888889956).
campaign_id
string
Filter by campaign ID.
agent_id
string
Filter by agent ID.
start_time
string
Filter logs from this datetime (inclusive). Format: ISO 8601 (e.g., 2026-01-17T00:00:00).
end_time
string
Filter logs until this datetime (inclusive). Format: ISO 8601 (e.g., 2026-01-17T23:59:59).
page
integer
default:1
Page number (1-indexed). Each page returns 10 logs.
count_only
string
default:"false"
If true, returns only the total count of matching logs without fetching log data.

Response

Standard Response (count_only=false)

success
boolean
Indicates whether the request was successful.
data
array
Array of log entries. Fields vary slightly based on type.
pagination
object
Pagination metadata.

Count-Only Response (count_only=true)

success
boolean
Indicates whether the request was successful.
total
integer
Total number of logs matching the filters.
{
  "success": true,
  "data": [
    {
      "call_id": "KjbdfYCefvutafHGCDhgfhgafhdyfyg",
      "date": "2026-01-17",
      "start_time": "2026-01-17T08:33:36",
      "end_time": "2026-01-17T08:35:08",
      "campaign_name": "August EMI Reminder Campaign",
      "campaign_id": "LKsfiGVdygfvYFGCdygayhf",
      "name": "John Wick",
      "loan_id": "LOAN-ABC-123",
      "duration": 14,
      "direction": "outbound",
      "from": "+918888888888",
      "to": "9999999999",
      "status": "No Contact",
      "disposition": "Voicemail",
      "transcript_id": "7437557f-7ab9-4012-b411-a6f534c5aaf0",
      "recording_id": "9242c009-1f8f-4bd6-a40c-e40926d1fd88",
      "extracted_data": {},
      "summary": "Customer acknowledged the pending EMI of ₹12,500 due on August 15 and promised to deposit the amount by tomorrow.",
      "agent_id": "lGJVyhgvayGDtfsfdfdf",
      "disposition_id": "YefgTYRCdygdygw",
      "type": "call"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 2450,
    "total_pages": 245,
    "has_next": true,
    "has_prev": false
  }
}

Usage Examples

Get all logs (page 1):
GET /api/v1/logs
Get only call logs:
GET /api/v1/logs?type=call
Get WhatsApp logs for a specific campaign:
GET /api/v1/logs?type=whatsapp&campaign_id=tcELESaJAtDfnWxJvzLU
Get logs within a date range:
GET /api/v1/logs?start_time=2026-01-17T00:00:00&end_time=2026-01-17T23:59:59
Get failed WhatsApp messages:
GET /api/v1/logs?type=whatsapp&status=Failed
Filter by customer phone and disposition:
GET /api/v1/logs?phone=8888889956&disposition=Voicemail
Get logs from a specific caller number:
GET /api/v1/logs?from_phone=+918035450808&type=call
Get page 3 of call logs:
GET /api/v1/logs?type=call&page=3
Count total failed logs:
GET /api/v1/logs?status=Failed&count_only=true
Combine multiple filters:
GET /api/v1/logs?type=call&status=No Contact&disposition=Voicemail&start_time=2026-01-01T00:00:00&end_time=2026-01-31T23:59:59&page=1