Create a comment
You can create a comment on a candidate using the API.
token
To create a comment, you must authenticate with a user token which can be retrieved using the Login method.
Request
This method allows you to create a comment on a candidate:
POST /company/{companyID}/applicant/{applicantID}/comment
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| companyID | path | string | Company identifier | 0GjqBwprWAdArDl4 | |
| applicantID | path | string | Candidate id | ||
| type | query | string | Comment type | note | |
| private | query | boolean | Whether the comment is private | true | |
| file | query | file | Attachment | zoGaHqRvJ/CV_test.pdf | |
| text | query | string | Comment content | In reply to the previous comment: very good English | |
| reply_to | query | string | Parent comment id | j4hq6zbqYZ20JA1z |
Request example
cURL request
curl -X POST 'https://api.flatchr.io/company/0GjqBwprWAdArDl4/applicant/ADYjo9mGxZdkN0ry/comment'
-H "Authorization: Bearer {token}"
-H 'Content-Type: application/json'
-F 'text="In reply to the previous comment: very good English level"' \
-F 'file=@"zoGaHrRvJ/CV_test.pdf"' \
-F 'private="true"' \
-F 'reply_to="j4hq6zbqYZ20Jn1z"'
Response
| Name | Type | Description |
|---|---|---|
| id | integer | Comment identifier |
| text | string | Comment text |
| private | boolean | Whether the comment is private |
| favorite | boolean | Whether the comment is favorited |
| created_by | integer | Comment author identifier |
| created_at | timestamp | Comment creation date |
| reply_to | integer | Parent comment identifier if this comment is a reply to an existing comment |
| author | author | Comment author |
| attachments | attachments | Comment attachments |
| ratings | [ratings] |
Response example
{
"id": 3620,
"text": "In reply to the previous comment: very good English level",
"private": true,
"favorite": false,
"created_by": 391,
"created_at": "2022-02-15T17:00:00.264Z",
"reply_to": 3618,
"author": {
"id": "lVq5r6pYXk9AmMvP",
"firstname": "XXXX",
"lastname": "XXXX"
},
"attachments": [],
"ratings": []
}