PATCH
/
rest
/
v1
/
accounts
Update Account
curl --request PATCH \
  --url https://onlyautomator.com/rest/v1/accounts \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "user_id": "53fd91a2-4321-5678-efgh-0123456789cd",
  "username": "creator_account",
  "name": "Creator Name",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
  "web_cookies": {
    "sess": "...",
    "auth_id": "..."
  },
  "web_local_storage": {
    "key": "value"
  },
  "web_session_storage": {
    "key": "value"
  },
  "proxy_id": "ws_proxy_12345",
  "proxy_address": "1.2.3.4",
  "proxy_port": 8080,
  "proxy_username": "proxy_user",
  "proxy_password": "securePassword123",
  "proxy_country_code": "US",
  "proxy_mode": "auto",
  "proxy_is_active": true,
  "proxy_region_preference": "DE"
}'
[
  {
    "id": "f7a12b39-1234-5678-abcd-0123456789ab",
    "user_id": "53fd91a2-4321-5678-efgh-0123456789cd",
    "username": "creator_account",
    "name": "Creator Name",
    "created_at": "2023-01-15T10:00:00Z",
    "updated_at": "2023-02-20T15:30:00Z",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
    "web_cookies": {
      "sess": "...",
      "auth_id": "..."
    },
    "web_local_storage": {
      "key": "value"
    },
    "web_session_storage": {
      "key": "value"
    },
    "proxy_id": "ws_proxy_12345",
    "proxy_address": "1.2.3.4",
    "proxy_port": 8080,
    "proxy_username": "proxy_user",
    "proxy_country_code": "US",
    "proxy_assigned_at": "2023-09-15T14:32:45Z",
    "proxy_mode": "auto",
    "proxy_is_active": true,
    "proxy_region_preference": "DE"
  }
]

Update Account(s)

Updates one or more existing account records that match the specified filters. You must provide a filter, typically id=eq.{accountId}, to specify which record(s) to update.
Be cautious when updating without a precise filter like id=eq.{value}, as it might modify multiple records.

Example Usage

// Update a specific account by ID
const updateSpecificAccount = async (accountId, updates) => {
  const { data, error } = await supabase
    .from('accounts')
    .update(updates) // updates is an object like { name: 'New Name', user_agent: '...' }
    .eq('id', accountId) // Filter to update only this specific account
    .select(); // Use .select() to return the updated record(s)

  if (error) {
    console.error('Error updating account:', error);
    throw error;
  }
  return data;
};

Authorizations

apikey
string
header
required

Supabase API Key (anon or service_role)

Headers

apikey
string
required

Supabase API Key (anon or service_role)

Query Parameters

id
string
required

Filter by ID (e.g., id=eq.UUID)

Body

application/json
user_id
string<uuid>
required

The ID of the user who owns this account.

Example:

"53fd91a2-4321-5678-efgh-0123456789cd"

username
string
required

The OnlyFans username associated with this account.

Example:

"creator_account"

name
string

The display name of the account.

Example:

"Creator Name"

user_agent
string

User agent string captured from the extension.

Example:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."

web_cookies
object

Browser cookies captured from the extension.

Example:
{ "sess": "...", "auth_id": "..." }
web_local_storage
object

Browser localStorage captured from the extension.

Example:
{ "key": "value" }
web_session_storage
object

Browser sessionStorage captured from the extension.

Example:
{ "key": "value" }
proxy_id
string

Unique identifier from the proxy provider.

Example:

"ws_proxy_12345"

proxy_address
string

IP address or hostname of the assigned proxy.

Example:

"1.2.3.4"

proxy_port
integer

Port number of the assigned proxy.

Example:

8080

proxy_username
string

Username for proxy authentication.

Example:

"proxy_user"

proxy_password
string

Password for proxy authentication.

Example:

"securePassword123"

proxy_country_code
string

ISO country code of the proxy.

Example:

"US"

proxy_mode
enum<string>
default:none

Proxy configuration mode.

Available options:
auto,
manual,
none
Example:

"auto"

proxy_is_active
boolean
default:true

Whether the proxy configuration is active.

Example:

true

proxy_region_preference
string

User's preferred country code for auto-assignment.

Example:

"DE"

Response

Account updated successfully

id
string<uuid>
required
Example:

"f7a12b39-1234-5678-abcd-0123456789ab"

user_id
string<uuid>
required

The ID of the user who owns this account.

Example:

"53fd91a2-4321-5678-efgh-0123456789cd"

username
string
required

The OnlyFans username associated with this account.

Example:

"creator_account"

name
string

The display name (often same as username initially).

Example:

"Creator Name"

created_at
string<date-time>
Example:

"2023-01-15T10:00:00Z"

updated_at
string<date-time>
Example:

"2023-02-20T15:30:00Z"

user_agent
string | null

User agent string captured from the extension.

Example:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."

web_cookies
object | null

Browser cookies captured from the extension.

Example:
{ "sess": "...", "auth_id": "..." }
web_local_storage
object | null

Browser localStorage captured from the extension.

Example:
{ "key": "value" }
web_session_storage
object | null

Browser sessionStorage captured from the extension.

Example:
{ "key": "value" }
proxy_id
string | null

Unique identifier from the proxy provider (e.g., Webshare ID).

Example:

"ws_proxy_12345"

proxy_address
string | null

IP address or hostname of the assigned proxy.

Example:

"1.2.3.4"

proxy_port
integer | null

Port number of the assigned proxy.

Example:

8080

proxy_username
string | null

Username for proxy authentication.

Example:

"proxy_user"

proxy_country_code
string | null

ISO country code of the proxy.

Example:

"US"

proxy_assigned_at
string<date-time> | null

Timestamp when the proxy was assigned.

Example:

"2023-09-15T14:32:45Z"

proxy_mode
enum<string> | null
default:none

Proxy configuration mode.

Available options:
auto,
manual,
none
Example:

"auto"

proxy_is_active
boolean | null
default:true

Whether the proxy configuration is active.

Example:

true

proxy_region_preference
string | null

User's preferred country code for auto-assignment.

Example:

"DE"