List contacts for a company (paginated)
curl --request GET \
--url https://api.salescaptain.com/v1/list-contacts/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/list-contacts/{company_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/list-contacts/{company_id}', 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.salescaptain.com/v1/list-contacts/{company_id}",
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://api.salescaptain.com/v1/list-contacts/{company_id}"
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://api.salescaptain.com/v1/list-contacts/{company_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/list-contacts/{company_id}")
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{
"message": "Contacts fetched successfully!",
"contacts": {
"data": [
{
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "[email protected]",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-02-20T14:45:00.000Z",
"tags": [
"VIP",
"New Lead",
"Follow Up"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
},
{
"cf_name": "Source",
"cf_value": "Website"
}
]
},
{
"contact_id": "c9d8e7f6-5a4b-3c2d-1e0f-9a8b7c6d5e4f",
"name": "Jane Smith",
"phone": "+14155559876",
"email": "[email protected]",
"created_at": "2024-01-20T08:15:00.000Z",
"updated_at": "2024-03-01T09:30:00.000Z",
"tags": [
"Customer",
"Premium"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Healthcare"
},
{
"cf_name": "Company Size",
"cf_value": "100-500"
}
]
},
{
"contact_id": "b8c7d6e5-4f3a-2b1c-0d9e-8f7a6b5c4d3e",
"name": "Mike Johnson",
"phone": "+14155554567",
"email": null,
"created_at": "2024-02-05T16:00:00.000Z",
"updated_at": null,
"tags": [],
"custom_fields": []
}
],
"pagination": {
"page_number": 1,
"items_per_page": 10,
"total_count": 156,
"total_pages": 16
}
}
}Contacts
List contacts
Retrieves a paginated list of contacts associated with a specific company.
Supports filtering, sorting, pagination, and optional search_key.
GET
/
v1
/
list-contacts
/
{company_id}
List contacts for a company (paginated)
curl --request GET \
--url https://api.salescaptain.com/v1/list-contacts/{company_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/list-contacts/{company_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/list-contacts/{company_id}', 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.salescaptain.com/v1/list-contacts/{company_id}",
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://api.salescaptain.com/v1/list-contacts/{company_id}"
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://api.salescaptain.com/v1/list-contacts/{company_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/list-contacts/{company_id}")
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{
"message": "Contacts fetched successfully!",
"contacts": {
"data": [
{
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "[email protected]",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-02-20T14:45:00.000Z",
"tags": [
"VIP",
"New Lead",
"Follow Up"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
},
{
"cf_name": "Source",
"cf_value": "Website"
}
]
},
{
"contact_id": "c9d8e7f6-5a4b-3c2d-1e0f-9a8b7c6d5e4f",
"name": "Jane Smith",
"phone": "+14155559876",
"email": "[email protected]",
"created_at": "2024-01-20T08:15:00.000Z",
"updated_at": "2024-03-01T09:30:00.000Z",
"tags": [
"Customer",
"Premium"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Healthcare"
},
{
"cf_name": "Company Size",
"cf_value": "100-500"
}
]
},
{
"contact_id": "b8c7d6e5-4f3a-2b1c-0d9e-8f7a6b5c4d3e",
"name": "Mike Johnson",
"phone": "+14155554567",
"email": null,
"created_at": "2024-02-05T16:00:00.000Z",
"updated_at": null,
"tags": [],
"custom_fields": []
}
],
"pagination": {
"page_number": 1,
"items_per_page": 10,
"total_count": 156,
"total_pages": 16
}
}
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Path Parameters
Unique identifier for the company
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Query Parameters
Page number for pagination (must be a positive integer)
Required range:
x >= 1Example:
1
Number of items per page (10-100, default 10)
Required range:
10 <= x <= 100Example:
10
Field to sort by
Available options:
name, number, email, created_at Example:
"created_at"
Sort direction (default desc)
Available options:
asc, desc Example:
"desc"
Filter contacts by channel type
Available options:
phone, email, facebook, instagram, whatsapp Example:
"phone"
Search contacts by name, phone, or email
Example:
"john"

