curl --request GET \
--url https://api.linkiasoft.com/api/v1/leads/stage-counts \
--header 'X-Tenant-Id: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.linkiasoft.com/api/v1/leads/stage-counts"
headers = {
"x-api-key": "<api-key>",
"X-Tenant-Id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'X-Tenant-Id': '<api-key>'}};
fetch('https://api.linkiasoft.com/api/v1/leads/stage-counts', 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://api.linkiasoft.com/api/v1/leads/stage-counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tenant-Id: <api-key>",
"x-api-key: <api-key>"
],
]);
$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://api.linkiasoft.com/api/v1/leads/stage-counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("X-Tenant-Id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linkiasoft.com/api/v1/leads/stage-counts")
.header("x-api-key", "<api-key>")
.header("X-Tenant-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkiasoft.com/api/v1/leads/stage-counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["X-Tenant-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"statusCode": 403,
"message": "API key missing required scope(s): conversations:read",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "API key missing required scope(s): conversations:read",
"error": "Forbidden"
}Count leads per stage
How many leads sit in each stage — the board’s column headers, without pulling every lead.
curl --request GET \
--url https://api.linkiasoft.com/api/v1/leads/stage-counts \
--header 'X-Tenant-Id: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.linkiasoft.com/api/v1/leads/stage-counts"
headers = {
"x-api-key": "<api-key>",
"X-Tenant-Id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'X-Tenant-Id': '<api-key>'}};
fetch('https://api.linkiasoft.com/api/v1/leads/stage-counts', 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://api.linkiasoft.com/api/v1/leads/stage-counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tenant-Id: <api-key>",
"x-api-key: <api-key>"
],
]);
$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://api.linkiasoft.com/api/v1/leads/stage-counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("X-Tenant-Id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linkiasoft.com/api/v1/leads/stage-counts")
.header("x-api-key", "<api-key>")
.header("X-Tenant-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkiasoft.com/api/v1/leads/stage-counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["X-Tenant-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"statusCode": 403,
"message": "API key missing required scope(s): conversations:read",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "API key missing required scope(s): conversations:read",
"error": "Forbidden"
}Authorizations
Your workspace API key. Create one in Settings → API Keys; the plaintext value is shown once and never again.
Keys are scoped. A key needs conversations:send to send, conversations:read to
read threads and messages, templates:read to list templates, and channels:read
to list channels. A key missing the scope for an endpoint gets 403.
The CRM endpoints use the same resource:action form: leads:read, leads:create,
leads:update, leads:delete, customers:read, customers:create,
customers:update, customers:delete, customers:manage.
Several resources have no scope of their own and borrow one:
| Resource | Governed by |
|---|---|
| Contacts | customers:* |
| Activities | customers:* for customer activities, leads:* for lead activities |
| Tags | customers:read to list, customers:manage to change |
| Pipeline stages | leads:* |
| Quick replies | quick-replies:read / quick-replies:write |
| WhatsApp groups | wa-groups:manage |
Grant only what the integration needs — a key that only sends notifications should
hold conversations:send and nothing else.
Your workspace UUID. Required on every request in addition to x-api-key.
It does not select the workspace — data access is always scoped to the workspace that owns the API key, and a mismatched value cannot read anyone else's data.
Response
A count per stage key.

