Facebook Account API#
API cap nhat thong tin va trang thai tai khoan Facebook.
Base URL: https://app.socialking.vn/api/v1
1. Cap nhat Status#
PATCH /fb/account/status/:accountId
#
Auth: API Key
Rate Limit: 500 req/sec
Scope: manager_account:update_status
URL Params: accountId (UUID hoac Facebook UID)
Request Body:
{
"status": "live",
"lastCheckedAt": "2026-03-30T10:00:00Z",
"note": "Checked OK"
}| Field | Type | Required | Validation |
|---|---|---|---|
status | string | Yes | new | live | die | pending | banned |
lastCheckedAt | string | No | ISO 8601 datetime |
note | string | No | Ghi chu |
Response (200):
{
"success": true,
"message": "Cap nhat status thanh cong",
"data": {
"id": "account-uuid",
"status": "live",
"lastCheckedAt": "2026-03-30T10:00:00Z",
"note": "Checked OK",
"updatedAt": "2026-03-30T10:00:00Z"
}
}2. Cap nhat Account#
PUT /fb/account/update/:accountId
#
Auth: API Key
Rate Limit: 500 req/sec
Scope: manager_account:update
URL Params: accountId (UUID hoac Facebook UID)
Request Body:
{
"name": "Account Updated",
"uid": "100012345678901",
"alias": "Alias name",
"note": "Notes here",
"gender": "male",
"country": "VN",
"age": 25,
"year_created": 2020,
"price": 50000,
"status": "live",
"is_automation": true,
"automation_expire": "2026-12-31T23:59:59Z",
"account_data": {
"cookie": "cookie_string",
"password": "password123",
"email": "account@example.com",
"phone": "0912345678",
"birthday": "1999-01-01",
"recovery_email": "recovery@example.com",
"profile_picture": "https://..."
},
"tagIds": ["tag-uuid-1"],
"poolIds": ["pool-uuid-1"],
"proxyId": "proxy-uuid",
"ownerId": "user-uuid"
}| Field | Type | Required | Validation |
|---|---|---|---|
name | string | No | Max 100 ky tu |
uid | string | No | Chuoi so |
alias | string | No | Max 100 ky tu |
note | string | No | Max 1000 ky tu |
gender | string | No | male | female | other |
country | string | No | 2 ky tu ISO code |
age | number | No | 13-120 |
year_created | number | No | 2004 - nam hien tai |
price | number | No | >= 0 |
status | string | No | new | live | die | pending | banned |
is_automation | boolean | No | |
automation_expire | string | No | ISO 8601, tuong lai |
account_data | object | No | Thong tin dang nhap |
tagIds | UUID[] | No | Max 20 |
poolIds | UUID[] | No | Max 10 |
proxyId | UUID | No | Proxy ID |
3. Danh sach Account#
GET /fb/account/get-all
#
Auth: API Key
Rate Limit: 100 req/sec
Scope: manager_account:read
Query Parameters:
| Param | Type | Default | Mo ta |
|---|---|---|---|
_s | string | - | Tim kiem theo name/uid |
_page | number | 1 | Trang |
_limit | number | 10 | Items/trang |
_order | string | desc | asc | desc |
_sort | string | - | Field sap xep |
status | string | - | Filter theo status |
4. Tao Action History#
POST /fb/account/action-history/:id
#
Auth: API Key
Rate Limit: 100 req/sec
URL Params: id (UUID hoac Facebook UID)
Request Body:
{
"actionType": "post_timeline",
"targetType": "user",
"targetId": "target-facebook-id",
"status": "success",
"actionData": {
"text": "Hello world",
"content": "Post content"
},
"resultId": "result-id",
"note": "Posted successfully",
"skContentId": "content-uuid",
"variantId": "variant-uuid",
"fbTaskId": "task-uuid",
"performedAt": "2026-03-30T10:00:00Z"
}| Field | Type | Required | Validation |
|---|---|---|---|
actionType | string | No | post_timeline | comment_post | react_post | … |
targetType | string | No | user | group | page | post | comment |
targetId | string | No | Facebook ID cua target |
parentId | string | No | Parent ID (cho reply) |
actionData | object | No | Du lieu action |
resultId | string | No | ID ket qua (post ID, comment ID) |
status | string | No | success | failed | pending | deleted, default success |
note | string | No | Ghi chu |
performedAt | string | No | ISO 8601 |
Response (200):
{
"success": true,
"message": "Tao lich su hanh dong thanh cong",
"data": {
"id": "action-uuid",
"fbAccountId": "account-uuid",
"fbAccountUid": "123456789",
"actionType": "post_timeline",
"targetType": "user",
"status": "success",
"performedAt": "2026-03-30T10:00:00Z",
"nextAvailableAt": "2026-03-30T10:05:00Z"
}
}