Sửa tự chấp nhận kết bạn
friends.auto_accept.setMCP:friends_auto_accept_setBộ công cụ: Thiết lập tự chạyChange the account's automatic friend-accept rule (labels, greeting, stale request withdrawal).
Quyền: Thiết lập tự chạy
Gọi bằng REST v2
curl -X POST https://zl.builera.app/api/public/v2/ops/friends.auto_accept.set \
-H "Authorization: Bearer za_live_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"accountId":"3f2b8c1e-5d4a-4e6b-9c7d-1a2b3c4d5e6f","rule":{}}'Mỗi khoá/kết nối tối đa 300 lệnh đọc và 60 lệnh ghi mỗi phút. Gọi lại cùng Idempotency-Key trả đúng kết quả cũ, không làm lại.
Gọi qua MCP
{
"method": "tools/call",
"params": {
"name": "friends_auto_accept_set",
"arguments": {
"accountId": "3f2b8c1e-5d4a-4e6b-9c7d-1a2b3c4d5e6f",
"rule": {}
}
}
}Thêm https://zl.builera.app/mcp vào ứng dụng AI rồi cho phép kết nối; AI chỉ thấy công cụ trong bộ bạn chọn.
Kết quả
HTTP 200
{ "status": "succeeded", "operationId": "…", "data": { … } }Ví dụ đầu vào
{
"accountId": "3f2b8c1e-5d4a-4e6b-9c7d-1a2b3c4d5e6f",
"rule": {}
}Thay mã (id) mẫu bằng mã thật lấy từ các thao tác liệt kê/tìm kiếm.
Lược đồ đầu vào (JSON Schema)
{
"type": "object",
"properties": {
"accountId": {
"type": "string",
"format": "uuid",
"description": "Zalo account id."
},
"rule": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": false
},
"mode": {
"type": "string",
"enum": [
"all",
"known_phone",
"label"
],
"default": "known_phone"
},
"labelIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"maxItems": 20,
"default": []
},
"dailyCap": {
"type": "integer",
"minimum": 1,
"maximum": 200,
"default": 30
},
"undoAfterDays": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"default": 14
}
},
"additionalProperties": false
}
},
"required": [
"accountId",
"rule"
],
"additionalProperties": false
}