POST /functions/v1/api with resource: "lead-notes".
Access control
All operations require authentication. Access is granted if the user owns the lead (via the lead’s agent) or is an internal admin. Non-owners receive a
403 Forbidden response.List notes
Retrieves all notes for a specific lead. Pinned notes appear first in the results.Must be
"lead-notes"Must be
"list"Response
Get a note
Retrieves a specific note by ID.Must be
"lead-notes"Must be
"get"The note UUID.
Response
Create a note
Creates a new note for a lead.Must be
"lead-notes"Must be
"create"Response (status 201)
Update a note
Updates an existing note. Onlycontent and is_pinned fields can be modified.
Must be
"lead-notes"Must be
"update"The note UUID.
Response
Delete a note
Permanently deletes a note.Must be
"lead-notes"Must be
"delete"The note UUID.
Response
Toggle pin status
Toggles the pinned status of a note. If the note is pinned it becomes unpinned, and vice versa.Must be
"lead-notes"Must be
"togglePin"The note UUID.
Response
Get pinned notes
Retrieves all pinned notes for a specific lead.Must be
"lead-notes"Must be
"pinned"Response
Note object
UUID of the note.
ID of the lead this note belongs to.
ID of the user who created the note.
The note text.
Whether the note is pinned. Pinned notes sort first in list results.
ISO 8601 timestamp.
ISO 8601 timestamp.
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing required parameters (e.g. leadId) |
| 401 | UNAUTHORIZED | Invalid or missing authentication token |
| 403 | FORBIDDEN | User does not own the lead |
| 404 | NOT_FOUND | Note not found |
| 500 | INTERNAL_ERROR | Server error |

