Overview
The Chores API allows you to create, read, update, delete, and reorder household chores. Each chore can be assigned to a household member and includes optional descriptions.
Endpoints
Get All Chores
Retrieves all chores for the authenticated user’s household, ordered by position.
Authentication : Required
Response
ID of the household this chore belongs to
Person assigned to this chore
Optional description of the chore
Position for ordering in the list
Whether the chore is completed (default: false)
curl -X GET https://your-domain.com/api/chores \
-H "Authorization: Bearer YOUR_CLERK_TOKEN"
Example Response
[
{
"id" : "clx123abc" ,
"householdId" : "clx456def" ,
"name" : "Vacuum living room" ,
"assignee" : "John" ,
"description" : "Don't forget under the couch" ,
"position" : 0 ,
"checked" : false ,
"createdAt" : "2024-03-15T10:00:00Z" ,
},
{
"id" : "clx789ghi" ,
"householdId" : "clx456def" ,
"name" : "Take out trash" ,
"assignee" : "Sarah" ,
"description" : "" ,
"position" : 1 ,
"checked" : false ,
"createdAt" : "2024-03-15T11:00:00Z" ,
}
]
Create or Reorder Chores
Creates a new chore or reorders existing chores.
Authentication : Required
Request Body (Create)
Request Body (Reorder)
Create Chore
Reorder Chores
Create Chore
Reorder Chores
curl -X POST https://your-domain.com/api/chores \
-H "Authorization: Bearer YOUR_CLERK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Wash dishes",
"assignee": "John",
"description": "Include pots and pans"
}'
Response (Create)
{
"id" : "clxnew123" ,
"householdId" : "clx456def" ,
"name" : "Wash dishes" ,
"assignee" : "John" ,
"description" : "Include pots and pans" ,
"position" : 2 ,
"checked" : false ,
"createdAt" : "2024-03-15T12:00:00Z" ,
}
Response (Reorder)
Status: 200 OK
Update Chore
Updates an existing chore’s details.
Authentication : Required
Request Body
curl -X POST https://your-domain.com/api/chores/update \
-H "Authorization: Bearer YOUR_CLERK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "clx123abc",
"name": "Deep clean living room",
"assignee": "Sarah",
"description": "Vacuum and dust all surfaces"
}'
Response
Returns the number of records updated (should be 1 if successful).
Delete Chore
Deletes a chore and creates a completion notification.
Authentication : Required
Request Body
curl -X POST https://your-domain.com/api/chores/delete \
-H "Authorization: Bearer YOUR_CLERK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "clx123abc"}'
Response
{
"id" : "clx123abc" ,
"householdId" : "clx456def" ,
"name" : "Vacuum living room" ,
"assignee" : "John" ,
"description" : "Don't forget under the couch" ,
"position" : 0 ,
"checked" : false ,
"createdAt" : "2024-03-15T10:00:00Z" ,
}
When a chore is deleted, a notification is automatically created with:
Type : “chores”
Title : “Chore Completed”
Body : “You completed: [chore name]“
Get Chores Count
Returns the total number of chores for the household.
Authentication : Required
curl -X GET https://your-domain.com/api/chores/count \
-H "Authorization: Bearer YOUR_CLERK_TOKEN"
Response
Error Responses
All endpoints may return these error responses:
User is not authenticated
or
or
500 Internal Server Error
Unexpected server error
Source Code Reference
Main routes: ~/workspace/source/src/app/api/chores/route.ts:19
Count endpoint: ~/workspace/source/src/app/api/chores/count/route.ts:19
Delete endpoint: ~/workspace/source/src/app/api/chores/delete/route.ts:21
Update endpoint: ~/workspace/source/src/app/api/chores/update/route.ts:19