Subscriber API
Subscriber Update
Update an existing subscriber’s name, gender, or labels via the ChatSyncs API. Use when a developer asks how to keep subscriber profile data in sync with their own CRM.
POST
/
whatsapp
/
subscriber
/
update
Subscriber Update
curl --request POST \
--url https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data apiToken=API-KEY \
--data phone_number_id=PHONE-NUMBER-ID \
--data phone_number=PHONE-NUMBER \
--data 'first_name=<string>' \
--data 'last_name=<string>' \
--data 'gender=<string>' \
--data 'label_ids=<string>'import requests
url = "https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update"
payload = {
"apiToken": "API-KEY",
"phone_number_id": "PHONE-NUMBER-ID",
"phone_number": "PHONE-NUMBER",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"label_ids": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
apiToken: 'API-KEY',
phone_number_id: 'PHONE-NUMBER-ID',
phone_number: 'PHONE-NUMBER',
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
label_ids: '<string>'
})
};
fetch('https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update', 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://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update"
payload := strings.NewReader("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"status": "1",
"message": "Subscriber updated successfully."
}Updates fields on an existing subscriber.
By REST convention this would ideally be a
PUT request — but the ChatSyncs API only exposes
it as POST. Use POST as shown below.Where to find a label’s ID: open Subscriber Manager → Labels — the ID
is shown next to each label name, ready to copy. Or call
Label List to fetch all of them at once. See
Finding Your IDs & API Token for a screenshot.
Body
application/x-www-form-urlencoded
Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.
Example:
"API-KEY"
The WhatsApp account's phone number ID. Where to find it.
Example:
"PHONE-NUMBER-ID"
The subscriber's phone number, with country code, digits only.
Example:
"PHONE-NUMBER"
The subscriber's first name.
The subscriber's last name.
The subscriber's gender.
Comma-separated label IDs, e.g. 1,4,5. Where to find it.
Was this page helpful?
⌘I
Subscriber Update
curl --request POST \
--url https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data apiToken=API-KEY \
--data phone_number_id=PHONE-NUMBER-ID \
--data phone_number=PHONE-NUMBER \
--data 'first_name=<string>' \
--data 'last_name=<string>' \
--data 'gender=<string>' \
--data 'label_ids=<string>'import requests
url = "https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update"
payload = {
"apiToken": "API-KEY",
"phone_number_id": "PHONE-NUMBER-ID",
"phone_number": "PHONE-NUMBER",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"label_ids": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
apiToken: 'API-KEY',
phone_number_id: 'PHONE-NUMBER-ID',
phone_number: 'PHONE-NUMBER',
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
label_ids: '<string>'
})
};
fetch('https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update', 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://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update"
payload := strings.NewReader("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&first_name=%3Cstring%3E&last_name=%3Cstring%3E&gender=%3Cstring%3E&label_ids=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"status": "1",
"message": "Subscriber updated successfully."
}
