← Back to Dashboard

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

RoleAccess
SUPER_ADMINFull access to all endpoints
MANAGERProfiles, assignments, stats, audit logs. No user/key management
VA_OPENERView Not checked/Opened profiles, open profiles, report problems
VA_WARMERView Warming profiles, update warming progress, warm checks
VA_PAGE_CREATORView Ready/Page Created profiles, mark pages created
AI_AGENTAgent batch endpoints, profile reads

POST /api/auth/login

Authenticate with username/password and receive a session cookie.

ParameterTypeRequiredDescription
usernamestringYesAccount username
passwordstringYesAccount 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 ParamTypeDescription
statusstringFilter by status (e.g. Warming, Opened, Dead)
sellerstringFilter by seller name
datestringFilter by date_added (YYYY-MM-DD)
va_idintegerFilter by assigned VA
limitintegerMax 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 ParamTypeDescription
monthstringMonth 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.

ParameterTypeRequiredDescription
daystringYesd1, d2, or d3
stepintegerYesStep index (0, 1, or 2)
valuebooleanYesChecked 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.

ParameterTypeRequiredDescription
problem_typestringYesSelfie, SMS (Phone Number), Another Device, or Loop robot verification (Wrong Password)
screenshot_urlstringYesURL 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.

ParameterTypeDescription
va_idinteger|nullUser ID of the VA, or null to unassign

PATCH /api/profiles/:prfId/resolve ADMIN/MANAGER

Resolve a problem/dead profile with an action.

ParameterTypeRequiredDescription
actionstringYesreturn (to Not checked), return_opened (to Opened), dead, replaced, trash
screenshot_urlstringScreenshot URL (required for dead action from UI)

POST /api/profiles/bulk-assign ADMIN/MANAGER

Bulk assign multiple profiles to a VA.

ParameterTypeRequiredDescription
prf_idsstring[]YesArray of PRF IDs
va_idintegerYesVA 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).

ParameterTypeRequiredDescription
va_idintegerYesVA 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.

ParameterTypeRequiredDescription
profilesobject[]YesArray 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 ParamTypeDescription
statusstringFilter by status
sellerstringFilter by seller name

PATCH /api/agent/profiles/:prfId

Update any field on a profile.

ParameterTypeDescription
statusstringNew status
namestringDisplay name
fb_uidstringFacebook UID
login_emailstringLogin email
fb_passwordstringPassword
two_fa_keystring2FA secret key
cookies_jsonstringCookies JSON blob
notesstringNotes
...anyAny 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.

ParameterTypeRequiredDescription
usernamestringYesUnique username
passwordstringYesPassword
rolestringYesOne of the RBAC roles
emailstringEmail address
allowed_sellersstringALL 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 ParamTypeDescription
prf_idstringFilter by profile ID
actor_namestringFilter by actor
actionstringFilter by action type
limitintegerMax 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.

ParameterTypeRequiredDescription
namestringYesDescriptive name for the key
rolestringYesRole 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.

ParameterTypeRequiredDescription
is_activebooleanYestrue 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"}