Skip to main content
POST
/
api
/
v2
/
update-note
Update Note
curl --request POST \
  --url https://onlyautomator.com/api/v2/update-note \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fanId": "12345",
  "content": "Subscriber likes fitness content and usually tips on workout videos.",
  "type": "personal",
  "color": "#3498db",
  "isPinned": false
}
'
{
  "status": "success",
  "data": {
    "id": "note_7d8e9f1a-5678-9012-ijkl-456789abcdef",
    "fanId": "12345",
    "content": "Subscriber likes fitness content and usually tips on workout videos.",
    "type": "personal",
    "color": "#3498db",
    "isPinned": false,
    "createdAt": "2023-03-15T14:23:45Z",
    "updatedAt": "2023-03-15T14:23:45Z"
  }
}
Updates or creates a note for a subscriber in the OnlyAutomator CRM system.

Endpoint

POST /api/v2/update-note

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.

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
content
string
required
Content of the note
type
string
Type of note. Can be one of: “personal”, “preferences”, “payment”, “content”, or “other”. Default: “personal”
color
string
Color code for the note (for visual categorization). Format: “#RRGGBB”
isPinned
boolean
Whether the note should be pinned to the top. Default: false

Response

status
string
Status of the request (success or error)
data
object
Note object that was created or updated
data.id
string
Unique identifier for the note (UUID).
data.fanId
string
Unique identifier of the subscriber/fan this note is associated with.
data.userId
string
Unique identifier of the OnlyAutomator user who created/updated this note.
data.content
string
Content of the note.
data.type
string
Type of the note (e.g., “personal”, “preferences”, “payment”).
data.source
string
Source of the note, typically “manual” for this endpoint.
data.color
string
Color code for the note (e.g., “#RRGGBB”, nullable).
data.isPinned
boolean
Whether the note is pinned (true/false, nullable).
data.createdAt
string
ISO timestamp of when the note was created.
data.updatedAt
string
ISO timestamp of when the note was last updated.

200 Success

{
  "status": "success",
  "data": {
    "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",
    "color": "#3498db",
    "isPinned": false,
    "createdAt": "2023-03-15T14:23:45Z",
    "updatedAt": "2023-03-15T14:23:45Z"
  }
}

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

Example:

"12345"

content
string
required

Content of the note

Example:

"Subscriber likes fitness content and usually tips on workout videos."

type
enum<string>
default:personal

Type of note

Available options:
personal,
preferences,
payment,
content,
other
Example:

"personal"

color
string

Color code for the note (for visual categorization)

Example:

"#3498db"

isPinned
boolean
default:false

Whether the note should be pinned to the top

Example:

false

Response

Note created or updated successfully

status
string
Example:

"success"

data
object