Skip to main content

Create a task

You can create a task through the API.

Request

This method allows you to create a task:

POST /company/{companyID}/task

Run in Postman

Parameters

ParameterInTypeRequiredDescriptionExample
companyIDpathstring
✔️
Company identifierWy3EOp2NP3p1KMq8
descriptionpayloadstring
✔️
description of the taskHandle emails
datepayloadtimestamp
✔️
date of the task2022-02-12T18:55:00.000Z
emailpayloadbooleanWill email notifications be sent?true
valuepayload[string]
✔️
value of the task["member=JBMQj09ZW7pxoRLO"]
userspayload[string]
✔️
users of the task["JBMQj09ZW7pxoRLO"]
memberIdpayloadstring
✔️
memberId of the taskJBMQj09ZW7pxoRLO

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

NameTypeDescription
idstringTask identifier
descriptionstringTask description
value[string]The element(s) the task relates to: member for a user and applicant for a candidate
typestringType (always equal to "task")
datetimestampTask date
donebooleanHas 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
}