Skip to content

Document Notes API permissions and endpoints#425

Open
promptless-for-oss wants to merge 5 commits into
mautic:7.0from
Promptless:promptless/pr-16067-notes-permissions
Open

Document Notes API permissions and endpoints#425
promptless-for-oss wants to merge 5 commits into
mautic:7.0from
Promptless:promptless/pr-16067-notes-permissions

Conversation

@promptless-for-oss
Copy link
Copy Markdown

Open this suggestion in Promptless to view citations and reasoning process

Documents the new lead:notes permission 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.

Trigger Events


Tip: Planning a big docs refactor? Use Deep Analysis to get help with the heavy lifting 🔍

- Add comprehensive Notes API documentation with all CRUD endpoints
- Document new lead:notes permission set (viewown, viewother, editown, editother, create, deleteown, deleteother, full)
- Update List Contact Notes endpoint in contacts.rst to specify required permissions
@promptless-for-oss promptless-for-oss requested review from a team, adiati98 and favour-chibueze May 1, 2026 07:00
Comment thread docs/rest_api/notes.rst

The Notes API uses the ``lead:notes`` permission set. This permission set is separate from ``lead:leads`` permissions, allowing administrators to grant note-specific access without full Contact access.

Available permissions:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Permission documentation based on PR #16067 which adds the lead:notes permission set via LeadPermissions.php using addExtendedPermissions('notes', false) - the extended pattern without publish capability.

Source: mautic/mautic#16067

``GET /contacts/ID/notes``

**Required permissions:** ``lead:notes:viewown`` or ``lead:notes:viewother``

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Permission requirement changed from lead:leads:viewown/lead:leads:viewother to lead:notes:viewown/lead:notes:viewother in LeadApiController.php per PR #16067.

Source: mautic/mautic#16067

escopecz
escopecz previously approved these changes May 11, 2026
Copy link
Copy Markdown
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions.

Comment thread docs/rest_api/notes.rst
Using the Mautic API library
****************************

You can interact with this API using the :xref:`Mautic API Library` as below, or the various HTTP endpoints described in this document.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wrap this in vale off/on statements.

Suggested change
You can interact with this API using the :xref:`Mautic API Library` as below, or the various HTTP endpoints described in this document.
.. vale off
You can interact with this API using the :xref:`Mautic API Library` as below, or the various HTTP endpoints described in this document.
.. vale on

Comment thread docs/rest_api/notes.rst Outdated
Comment thread docs/rest_api/notes.rst Outdated
Comment thread docs/rest_api/notes.rst
Comment on lines +58 to +63
.. vale off

Get Note
********

.. vale on
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. vale off
Get Note
********
.. vale on
Get note
********

Comment thread docs/rest_api/notes.rst
Comment on lines +144 to +149
.. vale off

List Notes
**********

.. vale on
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. vale off
List Notes
**********
.. vale on
List notes
**********

Comment thread docs/rest_api/notes.rst Outdated
Comment thread docs/rest_api/notes.rst Outdated
Comment thread docs/rest_api/notes.rst
Comment on lines +327 to +332
.. vale off

Delete Note
***********

.. vale on
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. vale off
Delete Note
***********
.. vale on
Delete note
***********

Comment thread docs/rest_api/notes.rst Outdated
Comment thread docs/rest_api/notes.rst
Comment on lines +358 to +370
.. code-block:: json

.. vale on No newline at end of file
{
"note": {
"id": null,
"text": "<p>Jim is super cool!</p>",
"type": "general",
"dateTime": "2015-07-23T13:14:00-05:00",
"lead": {
"id": 47
}
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: json
.. vale on
\ No newline at end of file
{
"note": {
"id": null,
"text": "<p>Jim is super cool!</p>",
"type": "general",
"dateTime": "2015-07-23T13:14:00-05:00",
"lead": {
"id": 47
}
}
}
Properties
----------
Refer to :ref:`note properties <get note properties>`.

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions.

adiati98 and others added 2 commits May 13, 2026 22:03
- Change "Notes API" to "notes API" (lowercase)
- Wrap API library section in vale off/on statements
- Use lowercase for section headers (Get note, List notes, Create note, Edit note, Delete note)
- Simplify "Retrieves an individual note by ID" to "Retrieves an individual note"
- Convert response descriptions to bullet point format
- Add reference anchors (get note response, get note properties, create note POST parameters)
- Change "Note properties" to "Properties" and rename the header section
- Update type description format to use colons
- Change "Query parameters" and "Data parameters" to proper header format with underlines
- Rewrite PUT/PATCH explanation for consistency with clearer behavior descriptions
- Update HTTP request format for Edit note to bullet list format
- Update response references to use new anchor format
- Add Properties section at end of Delete note referencing get note properties
@promptless-for-oss
Copy link
Copy Markdown
Author

@adiati98 Thanks for the detailed review! I've addressed all of your suggestions:

  • Lowercase "notes API" and all section headers (Get note, List notes, Create note, Edit note, Delete note)
  • Wrapped API library section in vale off/on statements
  • Simplified "Retrieves an individual note by ID" to "Retrieves an individual note"
  • Converted response descriptions to bullet point format
  • Added RST anchors for cross-references: get note response, get note properties, create note POST parameters
  • Changed "Note properties" to "Properties" section
  • Updated type descriptions to use colons
  • Changed "Query parameters" and "Data parameters" to proper header format with underlines
  • Rewrote PUT/PATCH explanation with clearer behavior descriptions
  • Updated HTTP request format for Edit note to bullet list
  • Added Properties section at end of Delete note referencing get note properties

Please let me know if there's anything else you'd like adjusted.

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss there are a couple of suggestions that you still need to address.

Split the response description into a bullet point and separate paragraph
as requested by reviewer.
Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the rest of the suggestions

Addresses reviewer feedback to wrap the API library content line
within vale off/on block, not just the section header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants