OnlyAutomator API
The OnlyAutomator API allows you to interact with the various services of our platform, including email marketing, scheduled tasks, webhooks, account management, and the Chrome extension features.Base URL
All API requests should be made to:API Endpoints
Extension API (v2)
Endpoint | Method | Description |
---|---|---|
/api/v2/account-connect | POST | Connect an OnlyFans account to the platform |
/api/v2/get-account | GET | Retrieve account information and connection status |
/api/v2/get-profile | GET | Get detailed profile information and metrics |
/api/v2/account/allowed-features | GET | Get features allowed by user’s plan |
/api/v2/fan/{fanId} | GET | Get details for a specific fan |
/api/v2/emojis | GET | Get user’s custom emoji settings |
/api/v2/emoji | POST | Create or update user’s emoji setting |
/api/v2/scripts | GET | Get all scripts for the user |
/api/v2/script | POST | Create a new script |
/api/v2/update-note | POST | Create or update a note for a subscriber |
/api/v2/update-of-note | POST | Synchronize a note from OnlyFans platform |
/api/v2/update-preference | POST | Update subscriber preference information |
/api/v2/sync-notes | POST | Synchronize notes between extension and backend |
/api/v2/update-country | POST | Update subscriber country information |
/api/v2/get-ppv-statistics | GET | Retrieve PPV message performance metrics |
/api/v2/get-preferences | GET | Get all preferences for a subscriber |
/api/v2/get-transactions | GET | Get transaction history for a subscriber |
Proxy Management
Endpoint | Method | Description |
---|---|---|
/api/proxy/account/{accountId} | GET | Get proxy configuration for an account |
/api/proxy/account/{accountId}/assign-auto | POST | Automatically assign a Webshare proxy |
/api/proxy/account/{accountId}/set-manual | POST | Manually set proxy configuration |
/api/proxy/account/{accountId}/preference | PUT | Update proxy preferences |
/api/proxy/account/{accountId}/disable | POST | Disable proxy for an account |
/api/proxy/account/{accountId}/handle-failure | POST | Report and handle proxy failure |
/api/proxy/webshare/available | GET | Get available Webshare proxies |
/api/whatsmyip | GET | Get client’s IP address as seen by the server |
Marketing
Endpoint | Method | Description |
---|---|---|
/api/marketing/send-email | POST | Send marketing email to audience/users |
/api/marketing/sync-users | GET/POST | Preview or sync users to Resend audience |
/api/marketing/test-email-simple | GET | Test sending emails with basic templates |
/api/marketing/templates | GET | Get all available email templates |
/api/marketing/test-template | POST | Test a specific email template with sample data |
Email Automation (Cron Jobs)
Endpoint | Method | Description |
---|---|---|
/api/cron/send-welcome-email | GET | Send welcome email to new users |
/api/cron/send-login-email | GET | Send login reminder emails to users |
/api/cron/send-feedback-email | GET | Send feedback request emails |
/api/cron/send-account-setup-email | GET | Send account setup reminder emails |
Webhooks
Endpoint | Method | Description |
---|---|---|
/api/webhooks/user-created | POST | Webhook for processing user creation events |
Account
Endpoint | Method | Description |
---|---|---|
/api/account/test | GET | Check if the account service is operational |
/api/account/process | POST | Process a specific account |
Testing
Endpoint | Method | Description |
---|---|---|
/api/test/sync-user | GET/POST | Test syncing a single user to Resend |
Microservice API
Endpoint | Method | Description |
---|---|---|
/api/test | GET | Health check for the microservice |
/api/process-account/{accountId} | POST | Process account data through the microservice |
Database
Endpoint | Method | Description |
---|---|---|
/rest/v1/accounts | GET/POST/PATCH/DELETE | Access accounts data via Supabase API |
Authentication
Authentication methods vary:- User Session (JWT via Cookies): Required for most WebApp APIs (
/api/fan/*
,/api/emoji/*
,/api/scripts/*
,/api/allowed-features
,/api/v2/*
, etc.). Obtain token from browser session after login. - Marketing API Key (Header): Required for
/api/marketing/send-email
,/api/marketing/sync-users
. UsesAuthorization: Bearer YOUR_MARKETING_API_SECRET
. - Testing API Key (Query Param): Required for
/api/test/sync-user
. Uses?apiKey=YOUR_MARKETING_SYNC_API_KEY
. - Cron API Key (Header): Required for
/api/cron/*
endpoints. UsesAuthorization: Bearer YOUR_CRON_SECRET
. - Webhooks: Use signature verification (e.g., Supabase webhooks).
Response Format
All responses are in JSON format. Successful responses typically include relevant data, while error responses include an error message and sometimes additional details.Success Response Example
Error Response Example
Rate Limiting
The service implements internal queue management to prevent rate limiting on external platforms. Please use the API responsibly to avoid overloading the service.Example Usage
Here’s a simple example of using the API to test an email template:Implementation Notes
The API is built using several technologies:- Main backend: Next.js
- Microservice: Express.js and TypeScript
- Data storage: Supabase (PostgreSQL)
- Queue system: Better-Queue
- Chrome Extension: React, TypeScript, and Vite
Future Enhancements
In upcoming versions, we plan to:- Improve documentation with more examples
- Add endpoints for automation management
- Implement webhooks for more events
- Add endpoints for statistics and analytics
- Expand Chrome Extension API capabilities