Method Documentation > Files and Folders
File Comment Add POST
Description
Add a comment to a file or folder.
URL
All responses are in JSON format by default, to specify an XML response add “.xml” to the end of the method name (in this case “file_comment_add”)
https://<your subdomain>.<your domain>/api/file_comment_add
Restrictions
The calling user must have:
- Access to the location the requested file resides in.
Parameters
Bold indicates required.
| Parameter | Description |
|---|---|
| api_key | Your API Key. |
| comment | The comment to be added. |
| file_id | ID of the file or folder being commented on. |
| timestamp | The current time in Unix timestamp format. |
| signature | Please see “User Authentication” for more information. |
Sample Response
Successful response In JSON:
{"fileCommentAdd":{"file_id":"104565","comment":"I approve this.","user_id":23456}}
Successful response in XML:
<fileCommentAdd>
<file_id>104565</file_id>
<comment>I approve this.</comment>
<user_id>23456</user_id>
</fileCommentAdd>
Error response In JSON:
{"error":{
"title":"Authentication Failed",
"message":"Authentication parameters missing or invalid."}
}
Error response In XML:
<error>
<title>Authentication Failed</title>
<message>Authentication parameters missing or invalid.</message>
</error>