REST Endpoints
The server exposes 90+ REST endpoints at http://localhost:5055. All responses are JSON unless noted otherwise.
Phone and Device
Section titled “Phone and Device”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/phone/devices | List connected devices (serial, model, nickname, status) |
| GET | /api/phone/stream/<device> | MJPEG stream (use as img src) |
| POST | /api/phone/input | Send input (tap, swipe, type, keyevent) |
| GET | /api/phone/elements/<device> | Interactive UI elements on screen |
| GET | /api/phone/packages/<device> | List installed packages |
Input Actions
Section titled “Input Actions”{"device": "serial", "action": "tap", "x": 540, "y": 1200}{"device": "serial", "action": "swipe", "x1": 540, "y1": 1800, "x2": 540, "y2": 600}{"device": "serial", "action": "type", "text": "hello"}{"device": "serial", "action": "keyevent", "key": "KEYCODE_BACK"}Bot Control
Section titled “Bot Control”| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/bot/start | Start a bot job |
| GET | /api/bot/status | Running bots per device |
| GET | /api/bot/logs/<job_id> | Log output for a job |
| POST | /api/bot/stop | Stop bot on a device |
Bot Types and Parameters
Section titled “Bot Types and Parameters”{ "type": "crawl", "device": "serial", "params": {"query": "#Cat", "tab": "top", "passes": 5, "date_filter": "Past 24 hours"}}| Type | Key Params |
|---|---|
crawl | query, tab, passes, date_filter |
outreach | strategy_id, min_followers, max_followers, limit, delay |
post | video_id, caption, hashtags, as_draft |
engage | duration_min, like_pct, comment_pct, fav_pct |
inbox_scan | max_scrolls |
perf_scan | num_posts |
publish_draft | draft_tag |
Influencers
Section titled “Influencers”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/influencers | List (with pagination, sorting, filtering) |
| GET | /api/influencer/<id> | Full profile + outreach history |
| POST | /api/outreach/<id> | Update outreach status |
| POST | /api/influencer/<id>/labels | Add/remove labels |
| GET | /api/influencers/stats | Aggregate stats |
Query Parameters for List
Section titled “Query Parameters for List”?page=1&per_page=50&sort=followers&order=desc&label=pet&min_followers=1000&status=not_contactedContent and Videos
Section titled “Content and Videos”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/content/videos | List videos (filter by status, type) |
| GET | /api/content/posts | Upload history for a video |
| POST | /api/content/videos/<id> | Update video status |
Content Generation
Section titled “Content Generation”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/gen/templates | List generation styles (72 templates) |
| POST | /api/gen/submit | Submit generation job |
| GET | /api/gen/jobs/<id> | Check job status |
| GET | /api/gen/jobs | List all generation jobs |
Content Plan and Agent
Section titled “Content Plan and Agent”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/content-plan | List all planned content |
| GET | /api/content-plan/<id> | Plan entry detail |
| POST | /api/content-plan/<id> | Update plan entry |
| POST | /api/agent/run | Run LLM content planner |
| GET | /api/agent/runs | Agent run history |
| GET | /api/agent/logs/<run_id> | Agent run logs |
| GET | /api/agent/memory | Get agent memory files |
| POST | /api/agent/memory | Update agent memory |
Scheduler
Section titled “Scheduler”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/schedules | List all schedules |
| POST | /api/schedules | Create schedule |
| PUT | /api/schedules/<id> | Update schedule |
| DELETE | /api/schedules/<id> | Delete schedule |
| POST | /api/schedules/<id>/toggle | Enable/disable |
| POST | /api/schedules/<id>/run-now | Trigger immediate run |
| GET | /api/scheduler/status | Per-phone status |
| GET | /api/scheduler/queue | Current job queue |
| GET | /api/scheduler/queue/<id>/logs | Job log stream |
| POST | /api/scheduler/queue/<id>/kill | Kill a job |
| POST | /api/scheduler/runs/<id>/restart | Re-enqueue job |
| GET | /api/scheduler/history | Archived job runs |
| GET | /api/scheduler/history/<id>/logs | Archived run logs |
| GET | /api/scheduler/timeline | 24h timeline data |
Skills
Section titled “Skills”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/skills | List all skills |
| GET | /api/skills/<name> | Skill detail |
| GET | /api/skills/<name>/actions | List actions |
| GET | /api/skills/<name>/workflows | List workflows |
| POST | /api/skills/<name>/run | Run workflow |
| POST | /api/skills/<name>/run-action | Run single action |
| GET | /api/skills/export/<name> | Download skill ZIP |
| POST | /api/skills/import | Upload skill ZIP |
| POST | /api/skills/create-from-recording | Create skill from macro |
Skill Creator
Section titled “Skill Creator”| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/creator/chat | Send message to LLM |
| POST | /api/creator/chat-stream | Streaming chat response |
| GET | /api/creator/ollama-models | List Ollama models |
App Explorer
Section titled “App Explorer”| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/explorer/start | Start BFS exploration |
| POST | /api/explorer/stop | Stop exploration |
| GET | /api/explorer/status | Poll progress |
| GET | /api/explorer/runs | List all explorations |
| GET | /api/explorer/run/<name> | Full state graph |
| GET | /api/explorer/screenshot/<name>/<state_id> | State screenshot |
| DELETE | /api/explorer/delete/<name> | Delete exploration |
Strategies
Section titled “Strategies”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/strategies | List message templates |
| POST | /api/strategies | Create template |
| PUT | /api/strategies/<id> | Update template |
| DELETE | /api/strategies/<id> | Delete template |
Analytics
Section titled “Analytics”| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/ph/sessions | PostHog events |
| GET | /api/ga4 | GA4 analytics data |
| GET | /api/analytics | Post performance metrics |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/tests | List test files and functions |
| POST | /api/test-runner/start | Run pytest suite |
| GET | /api/test-runner/status | Test run status |
| GET | /api/test-runner/recordings | List screen recordings |
WebRTC Streaming
Section titled “WebRTC Streaming”| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/phone/webrtc-signal | Relay signaling |
| POST | /api/phone/webrtc-callback/<device> | Receive from Portal |
| GET | /api/phone/webrtc-poll-signals/<device> | Poll signals |
| POST | /api/phone/webrtc-ws-send | Send via WebSocket |
| POST | /api/phone/webrtc-ws-poll | Poll WebSocket |
| GET | /api/phone/webrtc-viewer | Single-device viewer page |
| GET | /api/phone/webrtc-multi | Multi-device viewer page |
Related
Section titled “Related”- API: Device Methods — Python Device class API
- API: Skill Classes — Python skill classes
- API: CLI — command-line usage