Node.js
// Requires the documented scopes. Keep keys on your server.
// For writes, persist the request key first; inspect unknown results.
const result = await client.request("/contacts/910000000099@c.us", { method: "PUT", body: {"firstName":"Alex","lastName":"Example"}, idempotencyKey: process.env.IDEMPOTENCY_KEY });
console.log(result);{
"state": "completed",
"replayed": true,
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}WhatsApp actions
Save a WhatsApp contact
Phone-wide contacts:write. Saves first and last name in WhatsApp; phone address-book propagation may be delayed and varies by device. Never repeats an uncertain result automatically. Does not send or grant chat access.
Node.js
// Requires the documented scopes. Keep keys on your server.
// For writes, persist the request key first; inspect unknown results.
const result = await client.request("/contacts/910000000099@c.us", { method: "PUT", body: {"firstName":"Alex","lastName":"Example"}, idempotencyKey: process.env.IDEMPOTENCY_KEY });
console.log(result);{
"state": "completed",
"replayed": true,
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json