Create a task
You can create a task through the API.
Request
This method allows you to create a task:
POST /company/{companyID}/task
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| companyID | path | string | Company identifier | Wy3EOp2NP3p1KMq8 | |
| description | payload | string | description of the task | Handle emails | |
| date | payload | timestamp | date of the task | 2022-02-12T18:55:00.000Z | |
| payload | boolean | Will email notifications be sent? | true | ||
| value | payload | [string] | value of the task | ["member=JBMQj09ZW7pxoRLO"] | |
| users | payload | [string] | users of the task | ["JBMQj09ZW7pxoRLO"] | |
| memberId | payload | string | memberId of the task | JBMQj09ZW7pxoRLO |
Request example
cURL Request
curl -X POST 'https://api.flatchr.io/company/Wy3EOp2NP3p1KMq8/task'
-H "Authorization: Bearer {token}"
-H 'Content-Type: application/json'
-d '{"description":"Handle emails","date":"2022-02-12T18:55:00.000Z","email":true,"value":["member=JBMQj09ZW7pxoRLO"],"users":["JBMQj09ZW7pxoRLO"],"memberId":"JBMQj09ZW7pxoRLO"}'
Response
| Name | Type | Description |
|---|---|---|
| id | string | Task identifier |
| description | string | Task description |
| value | [string] | The element(s) the task relates to: member for a user and applicant for a candidate |
| type | string | Type (always equal to "task") |
| date | timestamp | Task date |
| done | boolean | Has the task been completed? |
Response example
{
"id": "X2kea8pXr0nN1o0B",
"description": "Handle emails curl",
"value": ["member=JBMQj09ZW7pxoRLO"],
"type": "task",
"date": "2022-02-12T18:55:00.000Z",
"done": false
}