Ops Dashboard API
Complete REST API for managing AdsPower profiles, users, warming workflows, and automation.
Authentication
All API endpoints require authentication via one of two methods:
1. API Key (recommended for automation)
Pass your API key in the x-api-key header. Each key has an assigned role that determines access level.
curl -H "x-api-key: ops_your_key_here" \
https://your-domain.com/api/profiles
2. Session Cookie (browser login)
Login via POST /api/auth/login and use the returned session cookie.
curl -c cookies.txt -X POST https://your-domain.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"your_password"}'
curl -b cookies.txt https://your-domain.com/api/profiles
Roles & Permissions
| Role | Access |
|---|---|
| SUPER_ADMIN | Full access to all endpoints |
| MANAGER | Profiles, assignments, stats, audit logs. No user/key management |
| VA_OPENER | View Not checked/Opened profiles, open profiles, report problems |
| VA_WARMER | View Warming profiles, update warming progress, warm checks |
| VA_PAGE_CREATOR | View Ready/Page Created profiles, mark pages created |
| AI_AGENT | Agent batch endpoints, profile reads |
POST /api/auth/login
Authenticate with username/password and receive a session cookie.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Account username |
| password | string | Yes | Account password |
// Response
{ "success": true, "user": { "id": 1, "username": "admin", "role": "SUPER_ADMIN", "allowed_sellers": "ALL" } }
GET /api/auth/me
Get current authenticated user info.
// Response (authenticated)
{ "user": { "id": 1, "username": "admin", "role": "SUPER_ADMIN" } }
// Response (not authenticated)
{ "user": null }
Profiles
GET /api/profiles
List profiles. Results filtered by role: VA_WARMER sees only Warming profiles, VA_OPENER sees Not checked/Opened, etc.
| Query Param | Type | Description |
|---|---|---|
| status | string | Filter by status (e.g. Warming, Opened, Dead) |
| seller | string | Filter by seller name |
| date | string | Filter by date_added (YYYY-MM-DD) |
| va_id | integer | Filter by assigned VA |
| limit | integer | Max results to return |
GET /api/profiles/:prfId
Get a single profile by its PRF ID.
// Response
{ "id": 1, "prf_id": "PRF-0001", "name": "...", "status": "Warming", "seller_name": "...", ... }
GET /api/profiles/stats
Get profile counts by status.
// Response
{ "Not checked": 22, "Opened": 23, "Warming": 14, "Ready for Page Creation": 0,
"Page Created": 41, "Dead": 1, "Replaced": 1, "Closed": 54, "Trash": 1,
"total": 175, "problems": 18, "dead": 1, "replaced": 1 }
GET /api/profiles/sellers
List all unique seller names with profile counts.
GET /api/profiles/calendar
Get profile counts by date for calendar view.
| Query Param | Type | Description |
|---|---|---|
| month | string | Month in YYYY-MM format |
GET /api/profiles/warming-info
Get warming capacity info. VA_WARMER gets their count/capacity; admins get all warmers' stats.
POST /api/profiles/:prfId/open
Mark a profile as Opened and queue an OPEN_BROWSER command for AdsPower.
POST /api/profiles/:prfId/start-warming
Move profile to Warming status and assign to current user.
PATCH /api/profiles/:prfId/warming
Update warming progress checkboxes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| day | string | Yes | d1, d2, or d3 |
| step | integer | Yes | Step index (0, 1, or 2) |
| value | boolean | Yes | Checked state |
POST /api/profiles/:prfId/warm-check
Record a warm check. If all warming steps are complete, moves to "Ready for Page Creation".
POST /api/profiles/:prfId/2fa-code
Generate a TOTP 2FA code from the profile's stored 2FA key.
// Response
{ "code": "123456", "remaining": 22 }
POST /api/profiles/:prfId/problem
Report a problem on a profile. Auto-assigns a replacement profile to the warming queue.
| Parameter | Type | Required | Description |
|---|---|---|---|
| problem_type | string | Yes | Selfie, SMS (Phone Number), Another Device, or Loop robot verification (Wrong Password) |
| screenshot_url | string | Yes | URL of uploaded screenshot |
POST /api/profiles/:prfId/page-created
Mark a profile as "Page Created".
PATCH /api/profiles/:prfId/assign ADMIN/MANAGER
Assign or unassign a VA to a profile.
| Parameter | Type | Description |
|---|---|---|
| va_id | integer|null | User ID of the VA, or null to unassign |
PATCH /api/profiles/:prfId/resolve ADMIN/MANAGER
Resolve a problem/dead profile with an action.
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | return (to Not checked), return_opened (to Opened), dead, replaced, trash |
| screenshot_url | string | Screenshot URL (required for dead action from UI) |
POST /api/profiles/bulk-assign ADMIN/MANAGER
Bulk assign multiple profiles to a VA.
| Parameter | Type | Required | Description |
|---|---|---|---|
| prf_ids | string[] | Yes | Array of PRF IDs |
| va_id | integer | Yes | VA user ID to assign to |
POST /api/profiles/auto-fill-warming ADMIN/MANAGER
Auto-fill a warmer's queue with Opened profiles up to capacity (45).
| Parameter | Type | Required | Description |
|---|---|---|---|
| va_id | integer | Yes | VA user ID |
Agent / Batch Operations
POST /api/agent/profiles/batch-ingest
Batch ingest profiles from a spreadsheet or external source. Upserts by fb_uid or login_email.
| Parameter | Type | Required | Description |
|---|---|---|---|
| profiles | object[] | Yes | Array of profile objects with fields: name, fb_uid, login_email, fb_password, two_fa_key, seller_name, marketplace, notes, user_agent |
POST /api/agent/profiles/deduplicate
Find and report duplicate profiles by fb_uid or login_email.
GET /api/agent/profiles
Get all profiles (agent-optimized, includes all fields).
| Query Param | Type | Description |
|---|---|---|
| status | string | Filter by status |
| seller | string | Filter by seller name |
PATCH /api/agent/profiles/:prfId
Update any field on a profile.
| Parameter | Type | Description |
|---|---|---|
| status | string | New status |
| name | string | Display name |
| fb_uid | string | Facebook UID |
| login_email | string | Login email |
| fb_password | string | Password |
| two_fa_key | string | 2FA secret key |
| cookies_json | string | Cookies JSON blob |
| notes | string | Notes |
| ... | any | Any other profile field |
GET /api/agent/commands/pending
Get pending commands for the AdsPower local agent.
Admin
GET /api/admin/users ADMIN/MANAGER
List all users with online status.
POST /api/admin/users SUPER_ADMIN
Create a new user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Unique username |
| password | string | Yes | Password |
| role | string | Yes | One of the RBAC roles |
| string | Email address | ||
| allowed_sellers | string | ALL or JSON array of seller names |
PATCH /api/admin/users/:id SUPER_ADMIN
Update a user's role, permissions, active status, or password.
DELETE /api/admin/users/:id SUPER_ADMIN
Delete a user and unassign their profiles.
POST /api/admin/users/:id/reset-password SUPER_ADMIN
Reset a user's password. Returns the new generated password.
// Response
{ "success": true, "password": "ZKaa#t9FPdMM" }
GET /api/admin/audit-logs ADMIN/MANAGER
Query the audit log.
| Query Param | Type | Description |
|---|---|---|
| prf_id | string | Filter by profile ID |
| actor_name | string | Filter by actor |
| action | string | Filter by action type |
| limit | integer | Max results (default 200) |
GET /api/admin/va-stats ADMIN/MANAGER
Get performance stats for all active VAs.
API Key Management
GET /api/admin/api-keys SUPER_ADMIN
List all API keys (prefix only, never the full key).
// Response
[{ "id": 1, "key_prefix": "ops_a1b2...", "name": "My Bot", "role": "MANAGER",
"is_active": 1, "last_used_at": "2026-11-16 22:30:00", "created_at": "..." }]
POST /api/admin/api-keys SUPER_ADMIN
Create a new API key. The full key is returned only once.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Descriptive name for the key |
| role | string | Yes | Role for this key's access level |
// Response (key shown ONCE)
{ "success": true, "key": "ops_a1b2c3d4e5f6...", "prefix": "ops_a1b2...", "name": "My Bot", "role": "MANAGER" }
PATCH /api/admin/api-keys/:id SUPER_ADMIN
Enable or disable an API key.
| Parameter | Type | Required | Description |
|---|---|---|---|
| is_active | boolean | Yes | true to enable, false to revoke |
DELETE /api/admin/api-keys/:id SUPER_ADMIN
Permanently delete an API key.
Ops Dashboard API v1.0 · All endpoints return JSON · Errors return {"error": "message"}