> ## Documentation Index
> Fetch the complete documentation index at: https://docs.znift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for the Znift Tasks API.

## Base URL

```
https://znift.com/api/v1
```

## Authentication

All endpoints require an `x-api-key` header. See [Authentication](/authentication) for setup and error codes.

## Request conventions

* **Content-Type:** `application/json` for all request bodies
* **Dates:** Strict `YYYY-MM-DD` with leading zeros (e.g., `2026-04-04`, not `2026-4-4`)
* **Task text:** Minimum 1 character

## Tips

<Tip>
  **Clearing optional fields:** Send `null` in a PATCH request to remove a value. For example, `{ "priority": null }` clears the priority.
</Tip>

<Note>
  **Deleting tasks:** A task must be archived before it can be permanently deleted. This prevents accidental data loss.
</Note>

<Note>
  **Dashboard endpoint:** If you're building an AI agent, `GET /tasks/dashboard?date=YYYY-MM-DD` gives you overdue items, pending tasks, completed tasks, and stats in a single call.
</Note>

## Explore endpoints

Browse all 13 endpoints with interactive playground in the [API Reference](/api-reference) tab.

## OpenAPI spec

The machine-readable spec is available at:

```
GET /api/v1/openapi.json
```

No authentication required. Use it to auto-generate client libraries or MCP server tools.
