Retrieve messages
You can retrieve messages exchanged with a candidate using the API.
Request
GET /company/{companyID}/applicant/{applicantID}/messages?fields=author,replied,mail,attachments,candidate
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| companyID | path | string | Company identifier | 0GjqBwprWAdArDl4 | |
| applicantID | path | string | Candidate id | V41QG9eja5pK6Xev | |
| fields | query | string | Fields to display, separated by a comma | author,replied,mail,attachments,candidate |
Request example
cURL request
curl -X GET 'https://api.flatchr.io/company/0GjNBwprWAdZrDl4/applicant/V41QG8eja5pK6XeV/messages?fields=author,replied,mail,attachments,candidate'
-H "Authorization: Bearer {token}"
-H 'Content-Type: application/json'
Response
| Name | Type | Description |
|---|---|---|
| id | integer | Message identifier |
| created_by | integer | Message author identifier |
| created_at | timestamp | Message creation date |
| auto | boolean | Whether the message was an automated message |
| Mail object | ||
| delivered | boolean | Whether the message was delivered |
| delivered_at | timestamp | Mail delivery date |
| author | author | Message author |
| candidate | candidate | The candidate concerned (only name and email fields are returned) |
| attachments | attachments | Mail attachments |
Response example
[
{
"id": "oLm7NdD0j7dNGbZQ",
"created_by": 391,
"created_at": "2022-02-16T09:32:07.381Z",
"auto": false,
"mail": {
"subject": "Phone interview proposal",
"text": "Hello Alexandre,\n\nI am following up on your application for the Network Administrator position. Are you available in the coming days for a first phone interview (15 minutes)?\n\nBest regards,",
"html": "<p>Hello Alexandre,</p><p>I am following up on your application for the Network Administrator position. Are you available in the coming days for a first phone interview (15 minutes)?</p><p>Best regards,</p>",
"status": null
},
"delivered": false,
"deliver_at": "2022-02-16T10:34:56.000Z",
"author": {
"firstname": "XXXX",
"lastname": "XXXX"
},
"candidate": {
"firstname": "XXXX",
"lastname": "XXXX",
"email": "XXXX@gmail.com"
},
"attachments": []
}
]