Retrieve one contact book by UID.
Get Contact Book
Summary
Retrieve one contact book by UID.
Prerequisites
- Authorization: Bearer w91_live_xxx
- Content-Type: application/json for JSON requests
Related documentation
Endpoint: GET /api/v2/contact-books/{bookUid}. Use this endpoint when a client needs metadata for one contact book before uploading contacts or building a campaign audience.
GET
/api/v2/contact-books/{bookUid}| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | header | Required | Bearer w91_public_token_here. Must be a global public API token. |
bookUid | string | Required | Contact book UID, for example grp_abc. |
Get contact book
curl -X GET "https://graph.whats91.com/api/v2/contact-books/grp_abc" \
-H "Authorization: Bearer w91_public_token_here"Get response
{
"success": true,
"message": "Contact book retrieved",
"data": {
"contactBook": {
"contactBookUid": "grp_abc",
"uid": "grp_abc",
"name": "Retail Leads",
"description": "Retail campaign contacts",
"color": "#0f62fe",
"status": "ACTIVE",
"contactCount": 120,
"createdAt": "2026-06-06T08:00:00.000Z",
"updatedAt": "2026-06-06T08:00:00.000Z"
}
},
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}Not Found
CONTACT_BOOK_NOT_FOUND
{
"success": false,
"error": {
"code": "CONTACT_BOOK_NOT_FOUND",
"message": "Contact book UID does not belong to the authenticated customer."
},
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}SDK Examples
Use these examples as starting points for server-side implementations.
cURL
curl -X GET "https://graph.whats91.com/api/v2/contact-books/{bookUid}" \
-H "Authorization: Bearer w91_live_xxx"Node.js
const response = await fetch("https://graph.whats91.com/api/v2/contact-books/{bookUid}", {
method: "GET",
headers: {
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);PHP
$ch = curl_init("https://graph.whats91.com/api/v2/contact-books/{bookUid}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer w91_live_xxx",
"Content-Type: application/json"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Python
import requests
response = requests.request(
"GET",
"https://graph.whats91.com/api/v2/contact-books/{bookUid}",
headers={
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json",
}
)
print(response.json())C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");
var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/contact-books/{bookUid}");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());