Server Automation API#
API danh cho server de lay cac automation schedules can chay.
Base URL: https://app.socialking.vn/api/v1
Rate Limit: 100 req/sec
1. Lay Schedules can chay#
GET /server/automation/get-due-schedules
#
Auth: API Key
Query Parameters:
| Param | Type | Default | Mo ta |
|---|---|---|---|
limit | number | 10 | Max 100, so schedules tra ve |
lookAheadMinutes | number | 30 | Max 60, so phut nhin truoc |
Response (200):
{
"success": true,
"data": [
{
"id": "schedule-uuid",
"enabled": true,
"paused": false,
"nextRunAt": "2026-03-30T10:30:00Z",
"lastRunAt": "2026-03-30T10:00:00Z",
"runCount": 5,
"fbAutomation": {
"id": "automation-uuid",
"name": "Auto Post Timeline",
"status": "active",
"flowData": {
"nodes": [...],
"edges": [...]
},
"skUserId": "user-uuid",
"fbNodes": [...],
"fbEdges": [...]
}
}
],
"metadata": {
"count": 1,
"checkTime": "2026-03-30T10:00:00Z",
"lookAheadMinutes": 30
}
}Luu y: API nay tra ve cac schedule co
nextRunAttrong khoangnowdennow + lookAheadMinutes. Server polling dinh ky de lay schedules va trigger automation.