Document Notes API permissions and endpoints#425
Conversation
- 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
|
|
||
| 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: |
There was a problem hiding this comment.
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`` | ||
|
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
| 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. |
There was a problem hiding this comment.
Let's wrap this in vale off/on statements.
| 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 |
| .. vale off | ||
|
|
||
| Get Note | ||
| ******** | ||
|
|
||
| .. vale on |
There was a problem hiding this comment.
| .. vale off | |
| Get Note | |
| ******** | |
| .. vale on | |
| Get note | |
| ******** |
| .. vale off | ||
|
|
||
| List Notes | ||
| ********** | ||
|
|
||
| .. vale on |
There was a problem hiding this comment.
| .. vale off | |
| List Notes | |
| ********** | |
| .. vale on | |
| List notes | |
| ********** |
| .. vale off | ||
|
|
||
| Delete Note | ||
| *********** | ||
|
|
||
| .. vale on |
There was a problem hiding this comment.
| .. vale off | |
| Delete Note | |
| *********** | |
| .. vale on | |
| Delete note | |
| *********** |
| .. 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 | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
| .. 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>`. |
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
- 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
|
@adiati98 Thanks for the detailed review! I've addressed all of your suggestions:
Please let me know if there's anything else you'd like adjusted. |
adiati98
left a comment
There was a problem hiding this comment.
@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.
adiati98
left a comment
There was a problem hiding this comment.
@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.
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.Trigger Events
Tip: Planning a big docs refactor? Use Deep Analysis to get help with the heavy lifting 🔍