Get merged customer
curl --request POST \
--url https://api.text.com/cdp/get_merged_customer \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786"
}
'import requests
url = "https://api.text.com/cdp/get_merged_customer"
payload = { "customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: 'cf89fa3a-5ee9-4bdb-84ec-38824b2e2786'})
};
fetch('https://api.text.com/cdp/get_merged_customer', 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.text.com/cdp/get_merged_customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => 'cf89fa3a-5ee9-4bdb-84ec-38824b2e2786'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.text.com/cdp/get_merged_customer"
payload := strings.NewReader("{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.text.com/cdp/get_merged_customer")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.text.com/cdp/get_merged_customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}"
response = http.request(request)
puts response.read_body{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
"organization_id": "f6a7fd72-2a76-4c4a-b165-9cb2e8b4c4e2",
"product": "livechat",
"monitoring": {
"name": "John Doe",
"name_is_default": false,
"email": "john.doe@example.com",
"avatar_url": "https://example.com/avatars/john.jpg",
"phone_number": "+1 555 000 1234",
"session_fields": [
{
"key": "account_id",
"value": "ACC-001"
}
],
"visits": [
{
"id": 1,
"started_at": "2026-06-01T10:00:00Z",
"ended_at": "2026-06-01T10:30:00Z",
"geolocation": {
"latitude": "40.7128",
"longitude": "-74.0060",
"country": "United States",
"country_code": "US",
"region": "New York",
"city": "New York",
"timezone": "America/New_York"
},
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"first_visited_page": {
"id": 101,
"started_at": "2026-06-01T10:00:00Z",
"url": "https://example.com/pricing",
"title": "Pricing",
"group_ids": [
1
]
},
"pages": [
{
"id": 101,
"started_at": "2026-06-01T10:00:00Z",
"url": "https://example.com/pricing",
"title": "Pricing",
"group_ids": [
1
]
}
]
}
],
"version": 3,
"state": "browsing",
"online": true,
"current_group_ids": [
1
],
"created_at": "2026-06-15T08:30:00Z",
"master_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786"
},
"custom_fields": {
"58737b5829e65621a45d598aa6f2ed8e": {
"plan": "enterprise",
"account_id": "ACC-001"
}
},
"statistics": {
"chats_count": 14,
"threads_count": 14,
"visits_count": 27,
"page_views_count": 83,
"greetings_accepted_count": 3,
"greetings_converted_count": 1,
"tickets_count": 2,
"tickets_inbox_count": 1,
"tickets_archive_count": 1,
"tickets_spam_count": 0,
"tickets_trash_count": 0,
"orders_count": 3,
"last_activity_at": "2026-06-01T10:30:00Z",
"last_visit_at": "2026-06-01T10:00:00Z",
"last_chat_at": "2026-06-28T14:00:00Z",
"last_ticket_created_at": "2026-06-20T09:00:00Z"
},
"chat": {
"active": true,
"chat_id": "PJ0MRSHTDG",
"thread_id": "K600PKZON8",
"last_updated_at": "2026-06-01T10:25:00Z",
"group_ids": [
1
],
"source_customer_client_id": "fe372ce8-dbf4-4b6b-ae27-516b18b6d6b5"
},
"invitation": {
"active": true,
"greeting_id": 42,
"greeting_unique_id": "a3f1b2c4-d5e6-7890-abcd-ef1234567890",
"greeting_name": "Welcome greeting"
},
"tickets": {
"e1a2b3c4-d5e6-7890-abcd-ef1234567890": {
"ticket_id": "e1a2b3c4-d5e6-7890-abcd-ef1234567890",
"hd_license_id": "12345",
"status": "open",
"silo": "inbox",
"created_at": "2026-06-20T09:00:00Z",
"last_updated_at": "2026-06-21T11:00:00Z",
"last_customer_message_at": "2026-06-21T11:00:00Z"
}
},
"omnichannel": {
"fbmessenger": [
{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"profile_pic": "https://example.com/fb/john.jpg",
"gender": "male",
"locale": "en_US",
"is_verified_user": false
}
],
"twilio": [
{
"phone_number": "+1 555 000 1234"
}
],
"whatsapp": [
{
"id": "15550001234",
"name": "John Doe",
"phone_number": "+15550001234"
}
]
},
"orders": [
{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
"store_platform": "shopify",
"store_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order_id": "order_001",
"order_number": "#1001",
"currency": "USD",
"total_price": 149.99,
"created_at": "2026-06-15T13:00:00Z",
"event_id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"event_client_id": "shopify_client_id",
"line_items": [
{
"title": "Text Enterprise Plan",
"quantity": 1,
"price": 149.99,
"sku": "LC-ENT-001",
"variant_id": "var_001",
"product_id": "prod_001"
}
]
}
],
"carts": [
{
"store_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"store_platform": "shopify",
"customer_signed_in": true,
"subtotal": 99.99,
"total": 109.99,
"subtotal_usd": 99.99,
"total_usd": 109.99,
"currency": "USD",
"items": [
{
"id": 7890,
"quantity": 1,
"variant_id": 11223,
"discounts": []
}
],
"last_updated_at": "2026-06-01T09:45:00Z"
}
]
}Customers
Get merged customer
Returns the merged customer data.
POST
/
get_merged_customer
Get merged customer
curl --request POST \
--url https://api.text.com/cdp/get_merged_customer \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786"
}
'import requests
url = "https://api.text.com/cdp/get_merged_customer"
payload = { "customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: 'cf89fa3a-5ee9-4bdb-84ec-38824b2e2786'})
};
fetch('https://api.text.com/cdp/get_merged_customer', 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.text.com/cdp/get_merged_customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => 'cf89fa3a-5ee9-4bdb-84ec-38824b2e2786'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.text.com/cdp/get_merged_customer"
payload := strings.NewReader("{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.text.com/cdp/get_merged_customer")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.text.com/cdp/get_merged_customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"cf89fa3a-5ee9-4bdb-84ec-38824b2e2786\"\n}"
response = http.request(request)
puts response.read_body{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
"organization_id": "f6a7fd72-2a76-4c4a-b165-9cb2e8b4c4e2",
"product": "livechat",
"monitoring": {
"name": "John Doe",
"name_is_default": false,
"email": "john.doe@example.com",
"avatar_url": "https://example.com/avatars/john.jpg",
"phone_number": "+1 555 000 1234",
"session_fields": [
{
"key": "account_id",
"value": "ACC-001"
}
],
"visits": [
{
"id": 1,
"started_at": "2026-06-01T10:00:00Z",
"ended_at": "2026-06-01T10:30:00Z",
"geolocation": {
"latitude": "40.7128",
"longitude": "-74.0060",
"country": "United States",
"country_code": "US",
"region": "New York",
"city": "New York",
"timezone": "America/New_York"
},
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"first_visited_page": {
"id": 101,
"started_at": "2026-06-01T10:00:00Z",
"url": "https://example.com/pricing",
"title": "Pricing",
"group_ids": [
1
]
},
"pages": [
{
"id": 101,
"started_at": "2026-06-01T10:00:00Z",
"url": "https://example.com/pricing",
"title": "Pricing",
"group_ids": [
1
]
}
]
}
],
"version": 3,
"state": "browsing",
"online": true,
"current_group_ids": [
1
],
"created_at": "2026-06-15T08:30:00Z",
"master_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786"
},
"custom_fields": {
"58737b5829e65621a45d598aa6f2ed8e": {
"plan": "enterprise",
"account_id": "ACC-001"
}
},
"statistics": {
"chats_count": 14,
"threads_count": 14,
"visits_count": 27,
"page_views_count": 83,
"greetings_accepted_count": 3,
"greetings_converted_count": 1,
"tickets_count": 2,
"tickets_inbox_count": 1,
"tickets_archive_count": 1,
"tickets_spam_count": 0,
"tickets_trash_count": 0,
"orders_count": 3,
"last_activity_at": "2026-06-01T10:30:00Z",
"last_visit_at": "2026-06-01T10:00:00Z",
"last_chat_at": "2026-06-28T14:00:00Z",
"last_ticket_created_at": "2026-06-20T09:00:00Z"
},
"chat": {
"active": true,
"chat_id": "PJ0MRSHTDG",
"thread_id": "K600PKZON8",
"last_updated_at": "2026-06-01T10:25:00Z",
"group_ids": [
1
],
"source_customer_client_id": "fe372ce8-dbf4-4b6b-ae27-516b18b6d6b5"
},
"invitation": {
"active": true,
"greeting_id": 42,
"greeting_unique_id": "a3f1b2c4-d5e6-7890-abcd-ef1234567890",
"greeting_name": "Welcome greeting"
},
"tickets": {
"e1a2b3c4-d5e6-7890-abcd-ef1234567890": {
"ticket_id": "e1a2b3c4-d5e6-7890-abcd-ef1234567890",
"hd_license_id": "12345",
"status": "open",
"silo": "inbox",
"created_at": "2026-06-20T09:00:00Z",
"last_updated_at": "2026-06-21T11:00:00Z",
"last_customer_message_at": "2026-06-21T11:00:00Z"
}
},
"omnichannel": {
"fbmessenger": [
{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"profile_pic": "https://example.com/fb/john.jpg",
"gender": "male",
"locale": "en_US",
"is_verified_user": false
}
],
"twilio": [
{
"phone_number": "+1 555 000 1234"
}
],
"whatsapp": [
{
"id": "15550001234",
"name": "John Doe",
"phone_number": "+15550001234"
}
]
},
"orders": [
{
"customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
"store_platform": "shopify",
"store_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order_id": "order_001",
"order_number": "#1001",
"currency": "USD",
"total_price": 149.99,
"created_at": "2026-06-15T13:00:00Z",
"event_id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"event_client_id": "shopify_client_id",
"line_items": [
{
"title": "Text Enterprise Plan",
"quantity": 1,
"price": 149.99,
"sku": "LC-ENT-001",
"variant_id": "var_001",
"product_id": "prod_001"
}
]
}
],
"carts": [
{
"store_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"store_platform": "shopify",
"customer_signed_in": true,
"subtotal": 99.99,
"total": 109.99,
"subtotal_usd": 99.99,
"total_usd": 109.99,
"currency": "USD",
"items": [
{
"id": 7890,
"quantity": 1,
"variant_id": 11223,
"discounts": []
}
],
"last_updated_at": "2026-06-01T09:45:00Z"
}
]
}Required scopes:
customers:roAuthorizations
PersonalAccessTokenOAuth2BearerToken
Use your account ID as the username and your personal access token (PAT) as the password, or pass a Base64-encoded value directly in the Authorization header. For more information, see the personal access tokens guide.
Body
application/json
The requested customer ID.
Response
Merged customer data.
Example:
"livechat"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{
"58737b5829e65621a45d598aa6f2ed8e": {
"phone": "0300 222 0000",
"address": "Prime Minister's Office, 10 Downing Street"
}
}
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I