The system exposes a RESTful API for managing accounts, content, schedules, and logs.
Base URL: http://localhost:3000/api
Retrieves a list of all accounts.
- GET
/accounts - Response:
200 OK{ "success": true, "data": [ { "id": 1, "nickname": "My Account", "status": "active", "isLoggedIn": true ... } ] }
Retrieves details for a specific account.
- GET
/accounts/:id
Initiates a QR code login process.
- POST
/accounts/login - Response:
200 OK(Async process, check WebSocket for QR code){ "success": true, "data": { "accountId": 12, "message": "..." } }
Checks if the account cookie is still valid.
- POST
/accounts/:id/refresh
- DELETE
/accounts/:id
- GET
/contents - Query Params:
status(optional): Filter by status (draft,scheduled,published,failed)
- GET
/contents/:id
- POST
/contents - Body:
{ "title": "My Post Title", "body": "Post description...", "type": "image" | "video", "mediaPaths": ["path/to/img1.jpg"], "tags": ["tag1", "tag2"], "location": "Optional Location" }
- PUT
/contents/:id - Body: Same as Create.
- DELETE
/contents/:id
- POST
/contents/upload - Body:
multipart/form-datawith keyfiles
- GET
/schedules - Query Params:
status(optional)
- GET
/schedules/:id
- POST
/schedules - Body:
{ "contentId": 1, "accountId": 1, "scheduledAt": "2026-06-01T12:00:00" }
Forces a pending (or failed) schedule to run now.
- POST
/schedules/:id/run
Resets a failed or cancelled schedule to 'pending' and executes it immediately.
- POST
/schedules/:id/retry
- DELETE
/schedules/:id
- GET
/logs - Query Params:
limit(default 100)
- GET
/logs/schedule/:id
- GET
/logs/stats - Response: Returns counts for accounts, contents, schedules, and daily publish stats.
Deletes all logs and historical schedule data.
- DELETE
/logs/cleanup