LetsBot Menu
Bắt đầu Tiếng Việt Ngôn ngữ

Đối tác kinh doanh của Meta Công ty đăng ký tại Vương quốc Anh

Ngôn ngữ

CRM · Endpoint API

PATCH /api/v1/crm/contacts/{id} Mới

Update a contact

Only the fields sent change; same validation and audit as the panel.

Only the fields sent change; same validation and audit as the panel. Same fields as Create a contact except phone. Scope: crm.

WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.

  • whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
  • whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
  • phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.

Nội dung JSON

{
  "name": "Ahmed Ali",
  "lifecycle_stage_id": 3,
  "owner_user_id": 3
}

Ví dụ yêu cầu

curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/contacts/42" \
  -H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ahmed Ali",
  "lifecycle_stage_id": 3,
  "owner_user_id": 3
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/42", {
  method: "PATCH",
  headers: {
    "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Ahmed Ali",
    "lifecycle_stage_id": 3,
    "owner_user_id": 3
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/42');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
    {
        "name": "Ahmed Ali",
        "lifecycle_stage_id": 3,
        "owner_user_id": 3
    }
    JSON,
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "PATCH",
    "https://your-workspace.letsbot.net/api/v1/crm/contacts/42",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "name": "Ahmed Ali",
        "lifecycle_stage_id": 3,
        "owner_user_id": 3,
    },
)

print(response.json())

Phản hồi

Updated200
{
  "success": true,
  "data": {
    "id": 42,
    "name": "Ahmed Ali",
    "phone": "966500000000",
    "email": "ahmed@example.com",
    "city": "Riyadh",
    "country": "SA",
    "lifecycle": {
      "id": 3,
      "name": "Customer"
    },
    "owner": {
      "id": 3,
      "name": "Sara Ahmed"
    },
    "company": {
      "id": 7,
      "name": "Example Trading Co."
    },
    "tags": [
      "vip"
    ],
    "custom_fields": {
      "source_campaign": "spring_sale"
    },
    "last_activity_at": "2026-10-08T09:30:00+03:00",
    "created_at": "2026-10-01T12:00:00+03:00",
    "updated_at": "2026-10-08T09:30:00+03:00",
    "url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
    "whatsapp_bsuid": null,
    "whatsapp_username": "ahmed_store",
    "phone_available": true
  }
}

Sẵn sàng khi bạn sẵn sàng

Dùng thử endpoint này với số của bạn

API hoạt động trong thời gian dùng thử miễn phí. Tạo tài khoản, kết nối số WhatsApp và sao chép khóa của bạn tại API → Dữ liệu xác thực.