API Examples
Replace BASE_URL and NOTADAY_TOKEN with values from your environment.
Environment
export BASE_URL="http://localhost:4000"
export NOTADAY_TOKEN="ntd_your_token_here"
Create A Task
curl "$BASE_URL/entries" \
-H "Authorization: Bearer $NOTADAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Review integration spec",
"type": "task",
"description": "Check endpoint behavior before shipping.",
"completed": false,
"backlog": false
}'
Create A Backlog Item
curl "$BASE_URL/entries" \
-H "Authorization: Bearer $NOTADAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Explore calendar sync",
"type": "task",
"backlog": true
}'
List Active Tasks
curl "$BASE_URL/entries?type=task&completed=false&backlog=false&page=1&limit=20" \
-H "Authorization: Bearer $NOTADAY_TOKEN"
Complete An Entry
curl -X PATCH "$BASE_URL/entries/ENTRY_ID/toggle-complete" \
-H "Authorization: Bearer $NOTADAY_TOKEN"
Move An Entry To Backlog
curl -X PATCH "$BASE_URL/entries/ENTRY_ID/toggle-backlog" \
-H "Authorization: Bearer $NOTADAY_TOKEN"
Create A Journal Entry
curl "$BASE_URL/entries" \
-H "Authorization: Bearer $NOTADAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Daily reflection",
"type": "journal",
"description": "{\"blocks\":[{\"type\":\"paragraph\",\"data\":{\"text\":\"Today I shipped the first integration draft.\"}}]}",
"mood": "great",
"location": "Office",
"weather": "sunny",
"reflectionCategory": "growth"
}'
Create A Channel
curl "$BASE_URL/channels" \
-H "Authorization: Bearer $NOTADAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Product",
"color": "#4f46e5"
}'
Create A Tag
curl "$BASE_URL/tags" \
-H "Authorization: Bearer $NOTADAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "deep-work",
"color": "#10b981"
}'