Add a new task to the TODO list

POST /tasks

Adds a new task to the TODO list and sets the status to 'new'

Responses

  • 201 application/json

    Task created successfully

    Hide response attributes Show response attributes object
    • id integer

      The unique identifier for a task.

    • A brief summary of the task.

    • status string

      The current status of the task, which can be 'new', 'in progress', or 'completed'.

      Values are new, in progress, or completed. Default value is new.

POST /tasks
curl \
 -X POST https://api.todolist.local/v1/tasks \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (201)
{
  "id": 3,
  "status": "new",
  "description": "Read a book"
}