curl --request PUT \
--url https://crm.wachat.net/api/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"title": "<string>",
"phone": "<string>",
"country_code": "<string>",
"email": "jsmith@example.com",
"language": "<string>",
"address": "<string>",
"note": "<string>",
"attributes": [
"<string>"
],
"is_unsubscribed": true,
"group_ids": [
123
]
}
'import requests
url = "https://crm.wachat.net/api/v1/contacts/{id}"
payload = {
"name": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"title": "<string>",
"phone": "<string>",
"country_code": "<string>",
"email": "jsmith@example.com",
"language": "<string>",
"address": "<string>",
"note": "<string>",
"attributes": ["<string>"],
"is_unsubscribed": True,
"group_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
first_name: '<string>',
middle_name: '<string>',
last_name: '<string>',
title: '<string>',
phone: '<string>',
country_code: '<string>',
email: 'jsmith@example.com',
language: '<string>',
address: '<string>',
note: '<string>',
attributes: ['<string>'],
is_unsubscribed: true,
group_ids: [123]
})
};
fetch('https://crm.wachat.net/api/v1/contacts/{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://crm.wachat.net/api/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>',
'title' => '<string>',
'phone' => '<string>',
'country_code' => '<string>',
'email' => 'jsmith@example.com',
'language' => '<string>',
'address' => '<string>',
'note' => '<string>',
'attributes' => [
'<string>'
],
'is_unsubscribed' => true,
'group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://crm.wachat.net/api/v1/contacts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://crm.wachat.net/api/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"error": {
"code": "not_found",
"message": "Contact not found.",
"details": "<string>"
}
}{
"message": "<string>",
"errors": {}
}Update contact
Updates the supplied fields of one contact without replacing unrelated attributes. Use it to keep recipient names, numbers, tags, or custom data synchronized with your application.
curl --request PUT \
--url https://crm.wachat.net/api/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"title": "<string>",
"phone": "<string>",
"country_code": "<string>",
"email": "jsmith@example.com",
"language": "<string>",
"address": "<string>",
"note": "<string>",
"attributes": [
"<string>"
],
"is_unsubscribed": true,
"group_ids": [
123
]
}
'import requests
url = "https://crm.wachat.net/api/v1/contacts/{id}"
payload = {
"name": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"title": "<string>",
"phone": "<string>",
"country_code": "<string>",
"email": "jsmith@example.com",
"language": "<string>",
"address": "<string>",
"note": "<string>",
"attributes": ["<string>"],
"is_unsubscribed": True,
"group_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
first_name: '<string>',
middle_name: '<string>',
last_name: '<string>',
title: '<string>',
phone: '<string>',
country_code: '<string>',
email: 'jsmith@example.com',
language: '<string>',
address: '<string>',
note: '<string>',
attributes: ['<string>'],
is_unsubscribed: true,
group_ids: [123]
})
};
fetch('https://crm.wachat.net/api/v1/contacts/{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://crm.wachat.net/api/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'first_name' => '<string>',
'middle_name' => '<string>',
'last_name' => '<string>',
'title' => '<string>',
'phone' => '<string>',
'country_code' => '<string>',
'email' => 'jsmith@example.com',
'language' => '<string>',
'address' => '<string>',
'note' => '<string>',
'attributes' => [
'<string>'
],
'is_unsubscribed' => true,
'group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://crm.wachat.net/api/v1/contacts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://crm.wachat.net/api/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"title\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"language\": \"<string>\",\n \"address\": \"<string>\",\n \"note\": \"<string>\",\n \"attributes\": [\n \"<string>\"\n ],\n \"is_unsubscribed\": true,\n \"group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"error": {
"code": "not_found",
"message": "Contact not found.",
"details": "<string>"
}
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Update an existing contact in the current workspace. Every field is optional — only the keys present in the request body are changed. Scramble reads these rules to document the request body.
Contact's full display name.
191Optional name parts.
191191191Optional salutation/title (e.g. Mr, Dr).
50Phone number in international format (digits, E.164).
32Country dial code (e.g. +91). Prefixed onto the phone if missing.
10Email address.
191Preferred language / locale.
80Postal address.
1000Free-text note attached to the contact.
2000Free-form key/value attributes stored against the contact.
Whether the contact has opted out of messages.
Group ids the contact belongs to (replaces the existing set).
Scope the existence check to the caller's workspace so a foreign
group id is rejected (was a global exists → cross-tenant ref).
