Skip to content

Call attempt intervals list

Method to retrieve the list of call attempt interval groups.


URL and method

GET /v2/call-attempt/


Parameters

offset int optional
Parameter used for pagination. Specifies the ordinal number of the item from which the selection starts. Default — 0

limit int optional
Parameter used for pagination. Number of items returned per request. Maximum value — 100. Default — 50


Request example

curl -X GET "https://YOUR_LINER_API_HOST/v2/call-attempt/?offset=0&limit=50" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?php

$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';

$query = http_build_query([
    'offset' => 0,
    'limit' => 50,
]);

$ch = curl_init($host . '/v2/call-attempt/?' . $query);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-Api-Key: ' . $token,
    ],
    CURLOPT_TIMEOUT => 15,
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($response === false) {
    throw new RuntimeException('cURL error: ' . curl_error($ch));
}

curl_close($ch);

echo "HTTP {$httpCode}\n";
echo $response;
const host = "https://YOUR_LINER_API_HOST";
const token = "YOUR_API_TOKEN";

const params = new URLSearchParams();
params.set("offset", "0");
params.set("limit", "50");

const res = await fetch(`${host}/v2/call-attempt/?${params.toString()}`, {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": token
  }
});

const data = await res.json();
console.log("HTTP", res.status, data);

Response example

{
  "success": true,
  "message": "",
  "data": {
    "list": [
      {
        "id": 123,
        "title": "Call attempt intervals",
        "intervals": [5, 10],
        "isDefault": false,
        "resetAttemptsEnabled": false
      }
    ],
    "next": 50,
    "total": 12345
  }
}

Response fields

Fields in data

Field Type Description
list array List of call attempt interval groups.
next int Offset for the next request.
total int Total number of call attempt interval groups.

Fields in list

Field Type Description
id int Call attempt group identifier.
title string Call attempt group title.
intervals array<int> List of intervals between call attempts in minutes.
isDefault bool Whether this interval group is the default one.
resetAttemptsEnabled bool Whether to reset attempts when the customer asks to “call back”.

Note

The structure of the data field is described above. For the general API response format, see Request schema