Document Notes API permissions and endpoints - #516
Conversation
Documents the new `lead:notes` permission set introduced in Mautic PR #16067. Adds comprehensive Notes API endpoint documentation including Get, List, Create, Edit, and Delete operations. Updates the List Contact Notes endpoint to specify the new permission requirements.
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
Address reviewer feedback: the table header already makes the content purpose clear.
|
Thanks for the review, @adiati98! I've removed the redundant "Available permissions:" label as suggested. The table now follows directly after the introductory paragraph. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
- Change text examples to professional content capturing Note use case - Update total to "2" to better illustrate list response - Add "// ..." to indicate additional objects in the list
|
Thanks for the review feedback @adiati98! I've addressed all your suggestions:
The changes have been pushed to this PR. |
|
/aside @escopecz, this PR replaces #425 that's closed due to issues with resolving conflicts. All commits and contents from that PR are preserved. I have a question. Is "Note" introduced in version 7.2 or earlier version? If from earlier, can you advise from which version? I need this info to know whether we need to backport this PR to other branches and add "Note" and "Notes" to the Mautic feature list in other branches than 7.2. TIA! ✨ |
|
Notes are there from the very beginning (version 1.0.0) I couldn't find any older PR regarding notes than this fix for note API: mautic/mautic#716 from Mautic 1.2.0. So the notes feature itself must have been there before that. |
|
Thanks for the historical context! You're right that Notes have been a core Mautic feature since version 1.0.0. This documentation PR focuses specifically on the new No changes needed to the documentation based on this feedback - just wanted to acknowledge the helpful context about the feature's history. |
shinde-rahul
left a comment
There was a problem hiding this comment.
@promptless-for-oss The documentation is useful and covers the new Notes API endpoints well, but some permission details need correction before merging.
Notes permissions don’t grant access to the associated Contact. Creating a Note requires lead:notes:create, but the User must also have permission to view the Contact being associated with the Note. Please clarify this in the general permissions section and under the Create Note endpoint.
There is also an important difference between the standalone Notes endpoints and GET /contacts/ID/notes:
- The standalone
/notesendpoints evaluate own/other permissions using the User who created the Note. GET /contacts/ID/notescurrently evaluatesviewownandviewotherusing the Contact owner.
Please document this distinction accurately, unless the implementation is going to be aligned separately.
A few additional fixes are needed:
- Change “Edits an Note” to “Edits a Note.”
- Avoid suggesting that Notes permissions can be used without Contact access. They are separate permissions, but Contact access is still required for operations involving the associated Contact.
Please update the documentation based on these points.
Applies maintainer @shinde-rahul's review feedback on PR mautic#516: - Clarify that lead:notes permissions don't grant Contact access; Contact operations still require lead:leads permissions. - Document that standalone /notes endpoints evaluate own/other against the Note creator (createdBy), while GET /contacts/ID/notes evaluates against the Contact owner. - Note that creating a Note also requires view access to the associated Contact. - Fix grammar: 'Edits an Note' -> 'Edits a Note'.
|
Thanks for the detailed review, @shinde-rahul — all four points have been applied and verified against the merged code in mautic/mautic#16067:
Vale passes on the changed content. PR #516 is updated and ready for another look. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
|
Thanks — we'll address the two |
Replace the two parenthetical constructs flagged by Vale's Google.Parens rule with unspaced em dashes, per @adiati98's review on PR mautic#516.
|
Done, @adiati98 — both |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
|
Thanks — we'll apply your two suggested rewordings for the permission descriptions (using dashes, no parentheses), address the remaining parentheses, and look into the 'no code-block here?' point. We'll verify against the source and push the update shortly. |
|
All four addressed and pushed, @adiati98:
Vale passes cleanly on the Notes API page (both |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
|
Thanks — we'll apply your suggested clarification distinguishing how viewown/viewother is evaluated for this endpoint (against the Contact owner) versus the standalone /notes endpoints (against the Note's createdBy), and push the update shortly. |
|
Applied, @adiati98 — the "List Contact Notes" note now uses a spaced hyphen instead of an em dash ("the Note's creator - the |
|
@all-contributors please add @shinde-rahul for review. |
|
I've put up a pull request to add @shinde-rahul! 🎉 |
Open this suggestion in Promptless to view citations and reasoning process
Documents the new
lead:notespermission set introduced in Mautic PR #16067. Adds comprehensive Notes API endpoint documentation and updates the List Contact Notes endpoint to specify the new permission requirements. Fresh branch from 7.2 as requested by reviewer.Review round (@adiati98 —
Google.ParensVale warnings): Both flagged parentheses indocs/rest_api/notes.rsthave been replaced with dashes, as requested — applied verbatim.lead:leads(Contact) permission set→lead:leads—Contact—permission set... note::(line 260):view the associated Contact (``lead:leads:viewown`` or ``lead:leads:viewother``)→ `view the associated Contact—lead:leads:viewownor ``lead:leads:viewother```.Vale now reports 0 errors, 0 warnings, and 0 suggestions on the file (both
Google.Parensfindings cleared, no newGoogle.EmDash/Google.EnDashintroduced — the dashes are unspaced em dashes per the repo convention).Review round (@adiati98 — 2026-07-28): All four review comments addressed.
docs/rest_api/contacts.rst(List Contact Notes note) — "Don't use parentheses": applied.against the Note's creator (``createdBy``).→against the Note's creator—the ``createdBy`` field.(unspaced em dash, consistent with this repo's dash convention).docs/rest_api/notes.rstPermissions intro — suggestion block: applied verbatim. Reworded toThe Notes API uses the ``lead:notes`` permission set, which is separate from the ``lead:leads`` - Contact on UI - permission set. However, ``lead:notes`` permissions don't grant access to the associated Contact: any operation involving a Contact still requires the appropriate ``lead:leads`` permission.docs/rest_api/notes.rstCreate Note note — suggestion block: applied verbatim. Reworded toIn addition to ``lead:notes:create``, the User must have permission to view the associated Contact - ``lead:leads:viewown`` or ``lead:leads:viewother``. Mautic checks view access against the Contact owner before creating the Note.docs/rest_api/notes.rstDelete Note response — "There's no code-block here?": applied. The empty.. code-block:: jsonunder the Delete Note "Response" section is now populated with the deleted-Note JSON object, mirroring the Get Note response and the delete-returns-full-entity convention used by the Delete Company and Delete Contact endpoints in this repo.Vale reports 0 errors, 0 warnings, and 0 suggestions on
docs/rest_api/notes.rst; thecontacts.rstedit introduced no new findings at the changed line.Review round (@adiati98 — 2026-07-28, suggestion block on
docs/rest_api/contacts.rst): the single actionable suggestion has been applied verbatim.docs/rest_api/contacts.rst(List Contact Notes.. note::) — suggestion block: applied verbatim.against the Note's creator—the ``createdBy`` field.→against the Note's creator - the ``createdBy`` field.(em dash replaced with a spaced hyphen per the reviewer's suggested text). No wording or technical meaning changed; the claim remains verified against Mautic PR #16067.The changed line introduces no new Vale findings, and
Google.Parensstays clear.Tip: Filter the Dashboard by labels or assignees to focus on what matters to you 🔎