> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "Create task"
description: "Create a new task."
api: "POST /tasks"
gridGap: 30
---

<Aside full>

<RequestExample>

```bash lines=false
curl -X POST "https://api.example.com/v1/tasks" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string"
}'
```

</RequestExample>

</Aside>

<OpenAPIEndpoint {...{"method":"post","path":"/tasks","summary":"Create task","description":"Create a new task.","parameters":[],"requestBody":{"required":true,"contentType":"application/json","schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200}}}},"responses":[{"status":"201","description":"Task created","schema":{"type":"object","required":["id","title","completed"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique task identifier"},"title":{"type":"string","description":"Short description of the task","minLength":1,"maxLength":200},"completed":{"type":"boolean","description":"Whether the task is done","default":false},"createdAt":{"type":"string","format":"date-time","description":"When the task was created"}}}},{"status":"400","description":"Validation error","schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}],"security":[{"name":"bearerAuth","type":"http","scheme":"bearer","in":"header","description":"JWT token from /auth/login"}],"servers":[{"url":"https://api.example.com/v1","description":"Production"}]}} />

---

*Powered by [holocron.so](https://holocron.so)*
