Списък с потенциални клиенти
curl --request GET \
--url https://call.aiployees.com/api/user/leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://call.aiployees.com/api/user/leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://call.aiployees.com/api/user/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://call.aiployees.com/api/user/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://call.aiployees.com/api/user/leads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://call.aiployees.com/api/user/leads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://call.aiployees.com/api/user/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"data": [
{
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567899",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04"
}
]
}
],
"first_page_url": "https://call.aiployees.com/api/user/leads?page=1",
"from": 1,
"last_page": 10,
"last_page_url": "https://call.aiployees.com/api/user/leads?page=10",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/leads?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/leads?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/leads?page=2",
"path": "https://call.aiployees.com/api/user/leads",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 150
}
Потенциални клиенти
Списък с потенциални клиенти
Извеждане на всички потенциални клиенти за удостоверения потребител с опции за филтриране и пагинация
GET
/
user
/
leads
Списък с потенциални клиенти
curl --request GET \
--url https://call.aiployees.com/api/user/leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://call.aiployees.com/api/user/leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://call.aiployees.com/api/user/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://call.aiployees.com/api/user/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://call.aiployees.com/api/user/leads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://call.aiployees.com/api/user/leads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://call.aiployees.com/api/user/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"data": [
{
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567899",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04"
}
]
}
],
"first_page_url": "https://call.aiployees.com/api/user/leads?page=1",
"from": 1,
"last_page": 10,
"last_page_url": "https://call.aiployees.com/api/user/leads?page=10",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/leads?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/leads?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/leads?page=2",
"path": "https://call.aiployees.com/api/user/leads",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 150
}
Този endpoint ви позволява да изведете всички потенциални клиенти, принадлежащи на удостоверения потребител, с различни опции за филтриране и пагинация.
Query параметри
string
Филтриране на потенциални клиенти по статус. Възможни стойности:
created, scheduled, processing, completed, rescheduled, reached-max-retries, blacklistedinteger
Филтриране на потенциални клиенти по ID на кампания
string
Филтриране на потенциални клиенти по телефонен номер (поддържа се частично съвпадение)
string
Филтриране на потенциални клиенти, създадени от тази дата (формат YYYY-MM-DD)
string
Филтриране на потенциални клиенти, създадени до тази дата (формат YYYY-MM-DD)
integer
Брой потенциални клиенти на страница (1-100, по подразбиране: 15)
integer
Номер на страница (по подразбиране: 1)
Полета в отговора
array
Show свойства
Show свойства
integer
ID на потенциалния клиент
integer
ID на кампанията, към която принадлежи този потенциален клиент
string
Телефонният номер на потенциалния клиент във формат E.164
object
Променливите, свързани с потенциалния клиент
string
Статусът на потенциалния клиент
string
Датата на създаване на потенциалния клиент
string
Датата на актуализиране на потенциалния клиент
object
array
Масив от вторични контакти, свързани с този потенциален клиент
Show свойства на secondary_contacts
Show свойства на secondary_contacts
integer
Номерът на текущата страница
integer
Брой елементи на страница
integer
Общ брой потенциални клиенти, отговарящи на критериите
integer
Номерът на последната страница
{
"current_page": 1,
"data": [
{
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567899",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:18:04",
"updated_at": "2025-06-30 11:18:04"
}
]
}
],
"first_page_url": "https://call.aiployees.com/api/user/leads?page=1",
"from": 1,
"last_page": 10,
"last_page_url": "https://call.aiployees.com/api/user/leads?page=10",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/leads?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/leads?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/leads?page=2",
"path": "https://call.aiployees.com/api/user/leads",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 150
}
⌘I

