Facebook Cooldown API#
API cấu hình cooldown (thời gian chờ) giữa các action trên Facebook.
Base URL: https://app.socialking.vn/api/v1
1. Danh sách Cooldown#
GET /social/fb/cooldown/get-all
#
Auth: Bearer Token (JWT)
Query Parameters:
| Param | Type | Default | Mô tả |
|---|---|---|---|
_page | number | 1 | Trang |
_limit | number | 20 | Items/trang |
_order | string | desc | asc | desc |
_search | string | - | Tìm kiếm |
2. Chi tiết Cooldown#
GET /social/fb/cooldown/get-by-id/:id
#
Auth: Bearer Token (JWT)
URL Params: id (UUID)
3. Tạo Cooldown#
POST /social/fb/cooldown/create
#
Auth: Bearer Token (JWT)
Request Body:
{
"actionType": "like",
"min_delay": 5,
"max_delay": 15,
"hourly_limit": 30,
"daily_limit": 200,
"energy_cost": 1,
"description": "Like cooldown config",
"enabled": true
}| Field | Type | Required | Validation |
|---|---|---|---|
actionType | ActionType | Yes | Enum loại action |
poolId | UUID | No | Nullable, Pool ID |
min_delay | number | Yes | Integer >= 0 (giây) |
max_delay | number | Yes | Integer >= 0, >= min_delay |
hourly_limit | number | No | Integer >= 1, nullable |
daily_limit | number | No | Integer >= 1, nullable |
energy_cost | number | No | Integer >= 0, default 1 |
description | string | No | Max 500 ký tự, nullable |
enabled | boolean | No | Default true |
Response (201):
{
"success": true,
"data": {
"id": "uuid-string",
"actionType": "like",
"min_delay": 5,
"max_delay": 15,
"hourly_limit": 30,
"daily_limit": 200,
"energy_cost": 1,
"enabled": true
}
}4. Tạo nhiều Cooldown#
POST /social/fb/cooldown/bulk-create
#
Auth: Bearer Token (JWT)
Rate Limit: 10 req/sec
Request Body:
{
"items": [
{ "actionType": "like", "min_delay": 5, "max_delay": 15 },
{ "actionType": "comment", "min_delay": 10, "max_delay": 30 }
],
"skipDuplicates": true
}| Field | Type | Required | Validation |
|---|---|---|---|
items | array | Yes | 1-100 items |
skipDuplicates | boolean | No | Default true |
5. Cập nhật Cooldown#
PUT /social/fb/cooldown/update/:id
#
Auth: Bearer Token (JWT)
URL Params: id (UUID)
Request Body: Các fields giống tạo, tất cả optional.
6. Cập nhật nhiều Cooldown#
PATCH /social/fb/cooldown/bulk-update
#
Auth: Bearer Token (JWT)
Rate Limit: 10 req/sec
Request Body:
{
"items": [
{ "id": "uuid-1", "min_delay": 10, "max_delay": 25 }
]
}7. Xóa Cooldown#
POST /social/fb/cooldown/delete
#
Auth: Bearer Token (JWT)
Request Body:
{
"ids": ["uuid-1", "uuid-2"]
}8. Reset về mặc định#
POST /social/fb/cooldown/reset
#
Auth: Bearer Token (JWT)
Rate Limit: 5 req/sec
Response (200):
{
"success": true,
"message": "Default cooldowns reset"
}