Get a customer
curl --request GET \
--url https://api.protodesk.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.protodesk.io/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.protodesk.io/v1/customers/{customerId}', 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.protodesk.io/v1/customers/{customerId}",
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.protodesk.io/v1/customers/{customerId}"
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.protodesk.io/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.protodesk.io/v1/customers/{customerId}")
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": "cus_x6q5vl75f5d53m7oet2k4r5w6a",
"externalId": "renter_123",
"name": "Maya",
"email": "maya@example.com",
"phone": "+628123456789",
"company": "Bali Villa Hub",
"language": "id",
"timezone": "Asia/Jakarta",
"avatarUrl": "https://cdn.example.com/avatars/maya.png",
"claimedEmail": "<string>",
"emailStatus": "<string>",
"lastActiveChannel": "whatsapp",
"firstContactAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"conversationCount": 123
}{
"error": {
"code": "route.not_found",
"message": "Not found",
"requestId": "req_x6q5vl75f5d53m7oet2k4r5w6a"
}
}Customers
Get a customer
GET
/
customers
/
{customerId}
Get a customer
curl --request GET \
--url https://api.protodesk.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.protodesk.io/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.protodesk.io/v1/customers/{customerId}', 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.protodesk.io/v1/customers/{customerId}",
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.protodesk.io/v1/customers/{customerId}"
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.protodesk.io/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.protodesk.io/v1/customers/{customerId}")
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": "cus_x6q5vl75f5d53m7oet2k4r5w6a",
"externalId": "renter_123",
"name": "Maya",
"email": "maya@example.com",
"phone": "+628123456789",
"company": "Bali Villa Hub",
"language": "id",
"timezone": "Asia/Jakarta",
"avatarUrl": "https://cdn.example.com/avatars/maya.png",
"claimedEmail": "<string>",
"emailStatus": "<string>",
"lastActiveChannel": "whatsapp",
"firstContactAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"conversationCount": 123
}{
"error": {
"code": "route.not_found",
"message": "Not found",
"requestId": "req_x6q5vl75f5d53m7oet2k4r5w6a"
}
}Authorizations
Use a workspace API key in the Authorization header. Keys use pk_live_<key_id> for production and pk_test<key_id>_ for test mode.
Path Parameters
Example:
"cus_x6q5vl75f5d53m7oet2k4r5w6a"
Response
Customer.
Every key is always present; optional fields are null when unset (never empty strings).
Example:
"cus_x6q5vl75f5d53m7oet2k4r5w6a"
Example:
"renter_123"
Example:
"Maya"
Example:
"maya@example.com"
Example:
"+628123456789"
Example:
"Bali Villa Hub"
Example:
"id"
Example:
"Asia/Jakarta"
Example:
"https://cdn.example.com/avatars/maya.png"
An email the customer claimed but that is not verified.
Email deliverability/suppression state (e.g. active, unsubscribed, bounced).
Example:
"whatsapp"
Number of conversations for this customer. Present on list responses only.
