Updates or creates a note for a subscriber in the OnlyAutomator CRM system.
Endpoint
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:
- Call this endpoint from your web application after logging in.
- 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.
- Log in to your application normally in your browser.
- Open Developer Tools (usually F12).
- Go to the Application tab (it might be called Storage in Firefox).
- Under the Storage section, find Cookies and select your application’s domain (e.g.,
http://localhost:3000 or https://onlyautomator.com).
- Look for a cookie named similar to
sb-access-token (the exact name might vary slightly based on Supabase configuration).
- Copy the entire value of this cookie. This is your Bearer token.
- 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.
Bearer token for authentication. Format: Bearer YOUR_JWT_TOKEN
Must be set to application/json
Request Body
Unique identifier of the subscriber/fan
Type of note. Can be one of: “personal”, “preferences”, “payment”, “content”, or “other”. Default: “personal”
Color code for the note (for visual categorization). Format: “#RRGGBB”
Whether the note should be pinned to the top. Default: false
Response
Status of the request (success or error)
Note object that was created or updated
Unique identifier for the note (UUID).
Unique identifier of the subscriber/fan this note is associated with.
Unique identifier of the OnlyAutomator user who created/updated this note.
Type of the note (e.g., “personal”, “preferences”, “payment”).
Source of the note, typically “manual” for this endpoint.
Color code for the note (e.g., “#RRGGBB”, nullable).
Whether the note is pinned (true/false, nullable).
ISO timestamp of when the note was created.
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"
}
}
Standard user JWT token for authentication.
Bearer token for authentication (JWT)
Unique identifier of the subscriber/fan
Example:"Subscriber likes fitness content and usually tips on workout videos."
type
enum<string>
default:personal
Available options:
personal,
preferences,
payment,
content,
other
Color code for the note (for visual categorization)
Whether the note should be pinned to the top
Note created or updated successfully