cURL
curl --request GET \
--url https://api.alpharun.com/api/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpharun.com/api/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alpharun.com/api/v1/contacts', 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.alpharun.com/api/v1/contacts",
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.alpharun.com/api/v1/contacts"
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.alpharun.com/api/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/contacts")
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{
"data": {
"contacts": [
{
"id": "contact123",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone_number": "+1234567890",
"ext_id": "ext_contact_789",
"custom_fields": [
{
"key": "preferred_contact_method",
"display_name": "Preferred Contact Method",
"type": "text",
"value": "email"
}
]
}
]
},
"next_cursor": null
}{
"error": 123,
"message": "<string>"
}Contacts
List Contacts
Returns all contacts in the company, ordered with the most recently created first. Results are paginated using a cursor: pass the next_cursor returned by a previous response as the cursor query parameter to fetch the next page. When next_cursor is null, there are no more results.
GET
/
contacts
cURL
curl --request GET \
--url https://api.alpharun.com/api/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpharun.com/api/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alpharun.com/api/v1/contacts', 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.alpharun.com/api/v1/contacts",
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.alpharun.com/api/v1/contacts"
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.alpharun.com/api/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/contacts")
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{
"data": {
"contacts": [
{
"id": "contact123",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone_number": "+1234567890",
"ext_id": "ext_contact_789",
"custom_fields": [
{
"key": "preferred_contact_method",
"display_name": "Preferred Contact Method",
"type": "text",
"value": "email"
}
]
}
]
},
"next_cursor": null
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of contacts to return in a single response. Defaults to 20. Must be between 1 and 100; values outside this range return a 400.
Required range:
1 <= x <= 100Pagination cursor returned as next_cursor in a previous response. Omit on the first request.