Skip to main content
POST
/
v1
/
tasks
Create a task
curl --request POST \
  --url https://api.yorlet.com/v1/tasks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "due_date": 2,
  "assignee": "<string>",
  "priority": 0,
  "important": false,
  "status": "to_do",
  "checklist_items": {}
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "task",
  "title": "<string>",
  "description": "<string>",
  "due_date": 123,
  "priority": 1.5,
  "assignee": {
    "id": "<string>",
    "created": 123,
    "object": "user",
    "email": "<string>",
    "name": "<string>",
    "account": "<string>",
    "deleted": false
  },
  "account": "<string>",
  "deleted": false,
  "important": false,
  "checklist_items": {}
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
title
string
required

The title of the task.

Minimum string length: 1
description
string
required

The description of the task.

Minimum string length: 1
due_date
number
required

The due date of the task as a unix timestamp.

Required range: x >= 1
assignee
string
required

The ID of the user to assign the task to.

Minimum string length: 1
priority
number
default:0

The priority of the task, where 0 is low and 3 is urgent.

Required range: 0 <= x <= 3
important
boolean
default:false

Whether the task is marked as important.

status
enum<string>
default:to_do

The status of the task.

Available options:
to_do,
in_progress,
done
checklist_items
object

Checklist items to attach to the task.

Response

200 - application/json

Returns the task object if the request succeeded.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
task
title
string
required

The title of the task.

description
string
required

The description of the task.

due_date
number
required

The due date of the task as a unix timestamp.

priority
number
required

The priority of the task, where 0 is low and 3 is urgent.

Required range: 0 <= x <= 3
status
enum<string>
required

The status of the task.

Available options:
to_do,
in_progress,
done
assignee
required

The assignee of this task.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

important
boolean
default:false

Whether the task is marked as important.

checklist_items
object

Checklist items attached to the task, keyed by ID.