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"
}
FieldTypeRequiredValidation
statusstringYesnew | live | die | pending | banned
lastCheckedAtstringNoISO 8601 datetime
notestringNoGhi 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"
}
FieldTypeRequiredValidation
namestringNoMax 100 ky tu
uidstringNoChuoi so
aliasstringNoMax 100 ky tu
notestringNoMax 1000 ky tu
genderstringNomale | female | other
countrystringNo2 ky tu ISO code
agenumberNo13-120
year_creatednumberNo2004 - nam hien tai
pricenumberNo>= 0
statusstringNonew | live | die | pending | banned
is_automationbooleanNo
automation_expirestringNoISO 8601, tuong lai
account_dataobjectNoThong tin dang nhap
tagIdsUUID[]NoMax 20
poolIdsUUID[]NoMax 10
proxyIdUUIDNoProxy ID

3. Danh sach Account#

GET /fb/account/get-all #

Auth: API Key

Rate Limit: 100 req/sec

Scope: manager_account:read

Query Parameters:

ParamTypeDefaultMo ta
_sstring-Tim kiem theo name/uid
_pagenumber1Trang
_limitnumber10Items/trang
_orderstringdescasc | desc
_sortstring-Field sap xep
statusstring-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"
}
FieldTypeRequiredValidation
actionTypestringNopost_timeline | comment_post | react_post | …
targetTypestringNouser | group | page | post | comment
targetIdstringNoFacebook ID cua target
parentIdstringNoParent ID (cho reply)
actionDataobjectNoDu lieu action
resultIdstringNoID ket qua (post ID, comment ID)
statusstringNosuccess | failed | pending | deleted, default success
notestringNoGhi chu
performedAtstringNoISO 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"
  }
}