Skip to main content

Prerequisites

  • A Znift account at znift.com
  • An API key (created in Profile > API Keys)

Step 1: Get your API key

  1. Log in to znift.com
  2. Go to Profile > API Keys
  3. Click Create API Key, give it a name
  4. Copy the key immediately — it’s only shown once
Your key looks like: znift_abc123...xyz

Step 2: Create a task

Replace YOUR_KEY with your actual API key and use today’s date in YYYY-MM-DD format.
curl -X POST https://znift.com/api/v1/tasks \
  -H "x-api-key: znift_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Review pull request",
    "date": "2026-04-04",
    "priority": "high"
  }'
Response (201 Created):
{
  "_id": "k57abc123def456"
}

Step 3: List your tasks

curl "https://znift.com/api/v1/tasks?date=2026-04-04" \
  -H "x-api-key: znift_YOUR_KEY"
Response (200):
[
  {
    "_id": "k57abc123def456",
    "text": "Review pull request",
    "date": "2026-04-04",
    "isCompleted": false,
    "priority": "high",
    "dueTime": null,
    "timeSpent": null,
    "details": null,
    "order": 0,
    "createdAt": 1743724800000,
    "archivedAt": null,
    "previousDates": []
  }
]

Step 4: Get your dashboard

The most useful endpoint for AI agents — one call gives you everything you need for a daily briefing:
curl "https://znift.com/api/v1/tasks/dashboard?date=2026-04-04" \
  -H "x-api-key: znift_YOUR_KEY"
Response (200):
{
  "overdue": [],
  "pending": [
    {
      "_id": "k57abc123def456",
      "text": "Review pull request",
      "date": "2026-04-04",
      "isCompleted": false,
      "priority": "high",
      "dueTime": null,
      "timeSpent": null,
      "details": null,
      "order": 0,
      "createdAt": 1743724800000
    }
  ],
  "completedToday": [],
  "stats": {
    "pendingCount": 1,
    "completedTodayCount": 0,
    "streak": 3
  }
}

Step 5: Complete a task

curl -X POST "https://znift.com/api/v1/tasks/k57abc123def456/toggle" \
  -H "x-api-key: znift_YOUR_KEY"
Response (200):
{
  "success": true
}
The task’s isCompleted flips from false to true (or vice versa).

Next steps

Authentication

API key security, rate limits, and both header formats

API Reference

All 13 endpoints with the interactive playground