Tra cứu API
Sửa ghi chú / nhãn của người
people_update — Replace the note and/or tags X-Buddy keeps for a person (never changes anything on X).
people_update · Đổi thiết lập trong X-Buddy
Mô tả kỹ thuật bằng tiếng Anh — đúng chữ AI agent đọc qua MCP.
Replace the note and/or tags X-Buddy keeps for a person (never changes anything on X). Pass expected_revision (from people_get / the last update) to refuse the write if someone changed them meanwhile.
| REST | PATCH /api/public/v1/people/{person} |
| Công cụ MCP | people_update |
| Quyền cần có | leads.manage — Chủ, Quản lý, Vận hành |
| Nhóm quyền | audience:write |
| Nhóm | Liên hệ và danh sách |
| Hiện sẵn trong hồ sơ | Khách & danh sách |
Đầu vào
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
person |
string (1–60 chars) | Có | person_id, @handle or #user_id. |
note |
string (0–2000 chars) | Không | |
tags |
array of string (1–40 chars) (0–30 items) | Không | |
expected_revision |
integer (0–∞) | Không | The person's revision you last read; a newer one → revision_conflict, nothing written. |
Kết quả
Trả về kết quả của thao tác trong phong bì { data, meta }.
Cần khoá idempotency (Idempotency-Key, 8–128 ký tự). Gửi lại cùng khoá không bao giờ làm lại việc.
Ví dụ
Gọi qua REST
curl -X PATCH "https://reach-link-craft.lovable.app/api/public/v1/people/%40example_person" \
-H "Authorization: Bearer $XBUDDY_API_KEY" \
-H "Idempotency-Key: 6f1c2a90-example-key" \
-H "Content-Type: application/json" \
-d '{}'
Gọi qua MCP
{
"method": "tools/call",
"params": {
"name": "people_update",
"arguments": {
"person": "@example_person",
"idempotency_key": "6f1c2a90-example-key"
}
}
}
Lỗi có thể gặp
| Mã | HTTP | Thử lại được |
|---|---|---|
unauthorized |
401 | Không |
key_expired |
401 | Không |
integration_revoked |
401 | Không |
connection_not_linked |
403 | Không |
integration_paused |
403 | Không |
workspace_integrations_paused |
403 | Không |
integration_authorization_lost |
403 | Không |
workspace_suspended |
403 | Không |
forbidden |
403 | Không |
invalid_input |
422 | Không |
rate_limited |
429 | Có |
internal |
500 | Có |
read_only |
403 | Không |
idempotency_key_required |
428 | Không |
idempotency_conflict |
409 | Không |
idempotency_processing |
409 | Có |
conflict |
409 | Không |
precondition_failed |
422 | Không |
revision_required |
428 | Không |
revision_conflict |
412 | Không |
not_found |
404 | Không |