Skip to main content
POST
/
api
/
v2
/
sync-notes
Sync Notes
curl --request POST \
  --url https://onlyautomator.com/api/v2/sync-notes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fanId": "12345",
  "force": false
}
'
{
  "status": "success",
  "data": {
    "synchronized": true,
    "noteCount": 3,
    "notes": [
      {
        "id": "note_7d8e9f1a-5678-9012-ijkl-456789abcdef",
        "fanId": "12345",
        "content": "Subscriber likes fitness content and usually tips on workout videos.",
        "type": "personal",
        "createdAt": "2023-03-15T14:23:45Z",
        "updatedAt": "2023-03-15T14:23:45Z"
      }
    ],
    "timestamp": "2023-03-16T09:45:12Z"
  }
}
Synchronizes notes for a specific subscriber between the Chrome extension and the OnlyAutomator backend.

Endpoint

POST /api/v2/sync-notes

Authentication

This endpoint requires authentication via bearer token representing a valid user session managed by Supabase Auth (cookies).Testing Note: Due to the requirement for a live user session, this endpoint cannot be successfully tested directly using the ‘Send’ button in this documentation with a static token.To test:
  1. Call this endpoint from your web application after logging in.
  2. Use curl or a similar tool with a valid, current user JWT obtained from your browser’s session after logging in.
Retrieving JWT Token for Testing: To test endpoints requiring a user session with tools like curl, you need the JWT access token stored by Supabase Auth in your browser.
  1. Log in to your application normally in your browser.
  2. Open Developer Tools (usually F12).
  3. Go to the Application tab (it might be called Storage in Firefox).
  4. Under the Storage section, find Cookies and select your application’s domain (e.g., http://localhost:3000 or https://onlyautomator.com).
  5. Look for a cookie named similar to sb-access-token (the exact name might vary slightly based on Supabase configuration).
  6. Copy the entire value of this cookie. This is your Bearer token.
  7. Use this copied value in the Authorization: Bearer <your_copied_token> header for your curl or other API tool requests.
Note: This token has a limited lifetime and you’ll need to copy a fresh one after it expires.
# Available URLs:
# - Local development: http://localhost:3000/api/v2/sync-notes
# - Production: https://onlyautomator.com/api/v2/sync-notes

# Example with curl:
curl -X POST "https://onlyautomator.com/api/v2/sync-notes" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fanId": "12345"
  }'

Request Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer YOUR_JWT_TOKEN
Content-Type
string
required
Must be set to application/json

Request Body

fanId
string
required
Unique identifier of the subscriber/fan whose notes should be synchronized
force
boolean
Force a full synchronization even if notes were recently synced. Default: false

Response

status
string
Status of the request (success or error)
data
object
Synchronization result
data.synchronized
boolean
Whether the synchronization was successful
data.noteCount
number
Number of notes synchronized
data.notes
array
Array of synchronized note objects. Each object can represent a general note or an OnlyFans-specific note.
data.timestamp
string
ISO timestamp of when the synchronization was performed

200 Success

{
  "status": "success",
  "data": {
    "synchronized": true,
    "noteCount": 3,
    "notes": [
      {
        "id": "note_uuid_7d8e9f1a",
        "fanId": "fan_uuid_12345",
        "userId": "user_uuid_abcdef",
        "content": "Subscriber likes fitness content and usually tips on workout videos.",
        "type": "personal",
        "source": "manual",
        "onlyFansNoteId": null,
        "color": "#3498db",
        "isPinned": false,
        "createdAt": "2023-03-15T14:23:45Z",
        "updatedAt": "2023-03-15T14:23:45Z"
      },
      {
        "id": "note_uuid_8e9f0g1h",
        "fanId": "fan_uuid_12345",
        "userId": "user_uuid_abcdef",
        "content": "Prefers to be messaged in the evening (GMT-8).",
        "type": "preferences",
        "source": "manual",
        "onlyFansNoteId": null,
        "color": null,
        "isPinned": true,
        "createdAt": "2023-03-14T19:45:30Z",
        "updatedAt": "2023-03-14T19:45:30Z"
      },
      {
        "id": "note_uuid_9f0g1h2i",
        "fanId": "fan_uuid_12345",
        "userId": "user_uuid_abcdef",
        "onlyFansNoteId": "of_note_789123",
        "content": "This note was created on OnlyFans platform.",
        "type": "general",
        "source": "onlyfans",
        "color": null,
        "isPinned": false,
        "createdAt": "2023-03-13T12:10:15Z",
        "updatedAt": "2023-03-13T12:10:15Z"
      }
    ],
    "timestamp": "2023-03-16T09:45:12Z"
  }
}

Authorizations

Authorization
string
header
required

Standard user JWT token for authentication.

Headers

Authorization
string
required

Bearer token for authentication (JWT)

Body

application/json
fanId
string
required

Unique identifier of the subscriber/fan whose notes should be synchronized

Example:

"12345"

force
boolean
default:false

Force a full synchronization even if notes were recently synced

Example:

false

Response

Notes synchronized successfully

status
string
Example:

"success"

data
object