Skip to main content
POST
/
api
/
v1
/
tasks
Create a new task
curl --request POST \
  --url https://znift.com/api/v1/tasks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "text": "<string>",
  "date": "2023-12-25",
  "dueTime": 123,
  "priority": "high",
  "isCompleted": true,
  "timeSpent": 123,
  "details": "<string>"
}
'
{
  "_id": "<string>"
}

Authorizations

x-api-key
string
header
required

API key with znift_ prefix. Create one in Profile > API Keys.

Body

application/json
text
string
required

Task text

Minimum string length: 1
date
string<date>
required

YYYY-MM-DD

dueTime
number

Due time as Unix timestamp in ms

priority
enum<string>
Available options:
high,
medium,
low
isCompleted
boolean

Defaults to false if omitted

timeSpent
number

Time spent in minutes

details
string

Additional details

Response

Task created

_id
string