Skip to main content
POST
/
tasks
curl -X POST http://localhost:3000/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "title": "Complete API documentation",
    "description": "Write comprehensive API docs for all task endpoints",
    "completed": false
  }'
{
  "id": 1,
  "title": "Complete API documentation",
  "description": "Write comprehensive API docs for all task endpoints",
  "completed": false,
  "userId": 5
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Celaya55/app-cr/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint requires implementation in the backend. Documentation reflects the expected API design based on the Task model schema.

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Request Body

title
string
required
The title of the task
description
string
Optional description of the task
completed
boolean
default:"false"
Whether the task is completed. Defaults to false if not provided.

Response

id
integer
The unique identifier for the task
title
string
The title of the task
description
string
The description of the task (null if not provided)
completed
boolean
Whether the task is completed
userId
integer
The ID of the user who owns this task
curl -X POST http://localhost:3000/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "title": "Complete API documentation",
    "description": "Write comprehensive API docs for all task endpoints",
    "completed": false
  }'
{
  "id": 1,
  "title": "Complete API documentation",
  "description": "Write comprehensive API docs for all task endpoints",
  "completed": false,
  "userId": 5
}