Account Restriction API#
API quan ly han che (restriction) tren tai khoan Facebook.
Base URL: https://app.socialking.vn/api/v1
Rate Limit: 100 req/sec
1. Tao Restriction#
POST /fb/account-restriction
#
Auth: API Key
Request Body:
{
"uid": "100012345678901",
"action_type": "post_timeline",
"reason": "Checkpoint detected",
"error_code": "282",
"message": "Verify checkpoint",
"expiresAt": "2026-04-30T10:00:00Z",
"source": "auto",
"is_active": true
}| Field | Type | Required | Validation |
|---|---|---|---|
fbAccountId | UUID | No* | Account UUID (*phai co 1 trong 2: fbAccountId hoac uid) |
uid | string | No* | Facebook UID (so) |
action_type | string | Yes | post_timeline | comment_post | react_post | … |
reason | string | No | Max 255 ky tu |
error_code | string | No | Max 50 ky tu (vd: 282, 956) |
message | string | No | Chi tiet loi |
restrictedAt | string | No | ISO 8601, thoi diem bat dau han che |
expiresAt | string | Yes | ISO 8601, thoi diem het han |
source | string | No | auto | manual, default manual |
is_active | boolean | No | Default true |
Response (201):
{
"success": true,
"message": "Tao han che tai khoan thanh cong",
"restriction": {
"id": "restriction-uuid",
"fbAccountId": "account-uuid",
"action_type": "post_timeline",
"reason": "Checkpoint detected",
"error_code": "282",
"message": "Verify checkpoint",
"restrictedAt": "2026-03-30T10:00:00Z",
"expiresAt": "2026-04-30T10:00:00Z",
"source": "auto",
"is_active": true,
"createdAt": "2026-03-30T10:00:00Z"
}
}Errors:
| Code | Mo ta |
|---|---|
| 400 | Phai cung cap fbAccountId hoac uid |
| 404 | Khong tim thay tai khoan |