Comments
Overview
Payables stored in Monite can have comments associated with them. Monite API Partners can use comments to store additional information about payables.
Webhooks are sent every time a comment is created, updated, or deleted.
Roles and permissions
To use the /comments* endpoints with an entity user token, this entity user must have a role with the comment permission.
If using a partner-level token, no special permissions are needed.
Create a comment
To create a comment, call POST /comments with the request body containing the comment text and the ID of the payable object to which the comment is related. The object_type field must be set to "payable". If the comment is a reply to another user, you can include the reply_to_entity_user_id field:
The successful response contains information about the newly created comment and the object to which the comment is related:
List all comments
To get a list of all the comments related to a specific object, call GET /comments passing the object_type and the object_id of the object to which the comments are related as query parameters:
The successful response contains information about all the comments associated with the supplied object:
Retrieve a comment
To get information about a specific comment associated with a specific object, call GET /comments/{comment_id}.
Edit a comment
To edit an existing comment, call PATCH /comments/{comment_id}. Only the creator of the comment is allowed to change it.
Delete a comment
To delete an existing comment, call DELETE /comments/{comment_id}.