Skip to content
  • Auto
  • Light
  • Dark
Get started

Create

Create
post/v1/todos
Body Parameters
completed_atstring
descriptionstring
tag_idsarray of string
titlestring
Returns
idstringcompleted_atstringcreated_atstringdescriptionstringtagsarray of objecttitlestringupdated_atstringTodo
curl https://todo-ninja-ziix.onrender.com/v1/todos \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TODO_NINJA_API_KEY" \
    -d '{
      "completed_at": "2021-01-01T00:00:00.000Z",
      "description": "Get butter, milk, and bread",
      "tag_ids": [
        "string"
      ],
      "title": "Buy groceries"
    }'
200 Example
{
  "id": "todo_nc6bzmkmd014706rfda898to",
  "completed_at": "2021-01-01T00:00:00.000Z",
  "created_at": "2021-01-01T00:00:00.000Z",
  "description": "Get butter, milk, and bread",
  "tags": [
    {
      "id": "tag_tz4a98xxat96iws9zmbrgj3a",
      "created_at": "2021-01-01T00:00:00.000Z",
      "label": "Work",
      "updated_at": "2021-01-01T00:00:00.000Z"
    }
  ],
  "title": "Buy groceries",
  "updated_at": "2021-01-01T00:00:00.000Z"
}