Add task

You can create tasks and assign to users.

 

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the lead

 

Request Body Parameter
Attribute Type Required Description
task_description string Yes Task description
date date Yes
assigned_user number Yes User id
done boolean No

Example Request & Response


$ curl https://api.custerem.com/<org_id>/leads/1/tasks/ \
-X POST \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "task_description": "Call Hayri",
    "date": "2022-02-22",
    "assigned_user": 1,
    "done": false
}'

 

201 Created

{
    "task_description": "Call Hayri",
    "date": "2022-02-22T00:00:00Z",
    "assigned_user": 1,
    "done": false
}

 

400 Bad Request

{
    "task_description": [
        "This field is required."
    ],
    "date": [
        "This field is required."
    ],
    "assigned_user": [
        "This field is required."
    ]
}