cURL
curl --request GET \
--url https://api.alpharun.com/api/v1/contacts/{CONTACT_ID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_ID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/contacts/{CONTACT_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{
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"ext_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>",
"type": "<string>",
"display_name": "<string>"
}
]
}{
"error": 123,
"message": "<string>"
}Contacts
Fetch Contact
GET
/
contacts
/
{CONTACT_ID}
cURL
curl --request GET \
--url https://api.alpharun.com/api/v1/contacts/{CONTACT_ID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_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.alpharun.com/api/v1/contacts/{CONTACT_ID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/contacts/{CONTACT_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{
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"ext_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>",
"type": "<string>",
"display_name": "<string>"
}
]
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The contact identifier, which can be either its UUID or its user-defined ext_id. When using the ext_id, the format should be alt:ext_id:<ext_id>.
Response
Contact fetched successfully
ID of the contact
Email address of the contact
Phone number of the contact
Ext id of the contact
First name of the contact
Last name of the contact
Custom fields of the contact
Show child attributes
Show child attributes
⌘I