Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
comment required |
Comment content Validations:
|
// Successful request POST /api/v2/assets/_nAP4srVRn36-h-NkabF/comments/3 { "comment": "new updated comment" } 200 { "comment": { "message": "new updated comment", "id": 3, "updated_at": "2023-11-27T09:42:41.744Z", "user": { "id": 41, "email": "admin-user-25@example.com", "first_name": null, "last_name": null, "avatar_url": null }, "mentioned_users": [] } }
// If :asset_id is not found POST /api/v2/assets/not-found-id/comments/4 { "comment": "new updated comment" } 404 { "error": "asset not found" }
// If :comment_id is not found POST /api/v2/assets/NZSjLmD3evGjFSxAnDH3/comments/not-found-id { "comment": "new updated comment" } 404 { "error": "Couldn't find Comment with 'id'=not-found-id [WHERE \"comments\".\"target_id\" = $1 AND \"comments\".\"target_type\" = $2]" }
// If current user is not a owner of the comment POST /api/v2/assets/2nU5cvV55n8Dggb8A6qG/comments/5 { "comment": "new updated comment" } 403 { "error": "Not allowed to perform this action" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |