Invoice Comment Add API
Invoice APIs
Invoice Comment Add API
Add a comment to a specific invoice, with optional @-mentions of users
Invoice Comment Add API
Documentation Index
Fetch the complete documentation index at: https://docs.pazy.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Yes | Unique identifier of the invoice to comment on |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
comment | string | Yes | The comment text (1–1500 characters). May contain @<userId> mentions — see Mentions below. |
Mentions
Comments support user mentions in the form@<userId> (the user’s id / slug). When rendered via the Invoice Comments API, valid @<userId> tokens are replaced with the user’s display name (e.g., @John Doe). Mentions whose user id does not exist in your organization are kept in the text as-is — they are not rejected.
Code Examples
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
insert | boolean | Indicates the comment was inserted on the invoice |
Response Example
Error Responses
Missing Comment
HTTP Status:400 Bad Request
Invalid Comment Type
HTTP Status:400 Bad Request
Invoice Not Found
HTTP Status:404 Not Found
Access Denied
HTTP Status:403 Forbidden
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
HTTP Status:403 Forbidden
Internal Error
HTTP Status:500 Internal Server Error
Best Practices
- Keep comments under 1500 characters — longer text is rejected with
VALIDATION_ERROR - Use
@<userId>to address specific users — fetch the id from the User List API or User Details API - The comment author is the user tied to the API key — there is no
userIdfield in the body - Use the Invoice Comments API to retrieve the thread with mentions resolved to user names