Skip to content

Click2CallGetCalls

GET click2call/calls/list

Returns the call history of the brand. Supports the platform list contract: paging, sorting, grouping, aggregates and filters, so the same method serves both the call list in a customer card and call reports by provider, country, or manager.

Access Control

Allowed roles: admin, leader, manager. The result is always scoped to the brand of the caller.

Request

GET request
GET https://{broker_domain}/click2call/calls/list?limit=20&orderBy=%5B%22id%22%2C%22DESC%22%5D&where=%7B%22callToParentId%22%3A140%7D&count=%5B%22id%22%5D
Authorization: <JWT_TOKEN>
{
  "command": "Click2CallGetCalls",
  "extID": "1",
  "data": {
    "limit": 20,
    "orderBy": [
      "id",
      "DESC"
    ],
    "where": {
      "callToParentId": 140
    },
    "count": [
      "id"
    ]
  }
}
const res = await platform.Click2CallGetCalls({
  limit: 20,
  orderBy: [
    "id",
    "DESC"
  ],
  where: {
    callToParentId: 140
  },
  count: [
    "id"
  ]
});

Request Data

Field Type Required Description
limit int No Page size, 1..1000, default 100
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
groupBy array No Grouping, including date grouping such as DAY({field})
count array No Count aggregate over the listed fields
sum array No Sum aggregate over the listed fields
min array No Min aggregate
max array No Max aggregate
avg array No Avg aggregate
where object No Filters; grouped orWhere is supported, see Table filter syntax

Response Data

count appears only when it was requested — a row count is an extra query, so it is opt-in.

{
  "rows": [
    {
      "id": 501,
      "brand": "default",
      "providerId": 1,
      "profileId": 3,
      "agentId": null,
      "dialRuleId": null,
      "managerId": 10,
      "callToParentType": "CUSTOMER",
      "callToParentId": 140,
      "phone": "380671234567",
      "phoneOriginal": "+38 067 123 45 67",
      "countryCode": "380",
      "countryIso": "UA",
      "externalId": "prov-77213",
      "status": "ANSWERED",
      "closedBy": "PROVIDER",
      "startedAt": "2026-08-24 13:32:41",
      "endedAt": "2026-08-24 13:35:02",
      "duration": 141,
      "recordingUrl": "https://provider.example/rec/501.mp3",
      "recordingRequiresAuth": false,
      "providerName": "twilio",
      "createdAt": "2026-08-24 13:32:40"
    }
  ],
  "count": [ { "id": 128 } ]
}

Errors

Code Error Description
400 VALIDATION_ERROR Unknown field in a filter or aggregate
500 INTERNAL_ERROR Storage error