TaskiKids API Documentation

REST API for creating and retrieving tasks and rewards programmatically, powered by Supabase Edge Functions.

You can find your Access Token, Family ID, and Kid IDs in the app under Settings → API Access. Tokens expire periodically — use the Refresh button to get a new one.

Base URL

https://tsspmgbvivrldppxlnkg.supabase.co/functions/v1

Authentication

All endpoints require a Supabase JWT token. Include it in the Authorization header:

Authorization: Bearer <your-access-token>

Copy your token from Settings → API Access in the app.

Create Task

POST /create-task

Creates a new task for a family.

Request Body

FieldTypeRequiredDescription
familyIdUUIDYesThe family ID to create the task for
namestringYesTask name (max 100 characters)
descriptionstringNoTask description (max 500 characters)
pointsnumberYesPoints awarded/deducted (-1000 to 1000, cannot be 0)
categorystringYesTask category (see valid values below)
prioritystringNolow, medium (default), or high
deadlinestringNoISO 8601 date (e.g. 2026-12-31T23:59:59Z)
autoApprovebooleanNoAuto-approve when the kid marks it done (default true)
recurrencestringNonone (default), daily, weekly, monthly
recurrenceDaysarrayNoFor weekly recurrence only: weekdays the task is available (0=Sunday, 1=Monday, ..., 6=Saturday). Empty/omitted = every day.
assignedKidIdsarrayNoArray of kid UUIDs to assign the task to

Valid Categories

Example

curl -X POST \
  'https://tsspmgbvivrldppxlnkg.supabase.co/functions/v1/create-task' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "familyId": "your-family-id",
    "name": "Make your bed",
    "points": 10,
    "category": "chores",
    "recurrence": "daily",
    "assignedKidIds": ["your-kid-id"]
  }'

Success Response (201 Created)

{
  "success": true,
  "task": {
    "id": "...",
    "familyId": "your-family-id",
    "name": "Make your bed",
    "points": 10,
    "category": "chores",
    "recurrence": "daily",
    "autoApprove": true,
    "assignedKidIds": ["your-kid-id"],
    "isActive": true
  }
}

Retrieve Tasks

GET /get-tasks?kidId=<uuid>

Retrieves all active tasks configured for a specific kid, including their current assignment status.

Query Parameters

ParameterTypeRequiredDescription
kidIdUUIDYesThe kid ID to retrieve tasks for (must belong to your family). This is the Kid ID shown in the app under Settings → API Access — the same value assignedKidIds takes on Create Task.

Example

curl -X GET \
  'https://tsspmgbvivrldppxlnkg.supabase.co/functions/v1/get-tasks?kidId=your-kid-id' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Success Response (200 OK)

{
  "success": true,
  "kidId": "your-kid-id",
  "tasks": [
    {
      "id": "...",
      "name": "Make your bed",
      "description": "Make your bed neatly every morning",
      "points": 10,
      "category": "chores",
      "priority": "medium",
      "deadline": null,
      "autoApprove": true,
      "recurrence": "daily",
      "recurrenceDays": null,
      "isPaused": false,
      "isActive": true,
      "assignmentStatus": "pending",
      "assignmentDueDate": null
    },
    {
      "id": "...",
      "name": "Soccer practice",
      "description": null,
      "points": 20,
      "category": "sports",
      "priority": "high",
      "deadline": null,
      "autoApprove": false,
      "recurrence": "weekly",
      "recurrenceDays": [1, 3, 5],
      "isPaused": false,
      "isActive": true,
      "assignmentStatus": "submitted",
      "assignmentDueDate": null
    }
  ]
}

Response Fields

FieldTypeDescription
idUUIDTask ID
namestringTask name
descriptionstringTask description (null if not set)
pointsnumberPoints awarded for completion
categorystringTask category
prioritystringlow, medium, or high
deadlinestringISO 8601 date (null if not set)
autoApprovebooleanWhether submissions are auto-approved
recurrencestringnone, daily, weekly, or monthly
recurrenceDaysarrayWeekdays for weekly tasks (0=Sun..6=Sat), null otherwise
isPausedbooleanWhether the task is paused
isActivebooleanWhether the task is active (always true in results)
assignmentStatusstringCurrent status: pending, submitted, approved, rejected, or expired
assignmentDueDatestringDue date for this specific assignment (null if not set)

Note: Only active tasks (is_active = true) are returned. Deleted tasks are excluded. Paused tasks are included but flagged with isPaused: true.

One entry per task. A recurring task has a separate assignment record for every occurrence, but it is returned only once here — assignmentStatus and assignmentDueDate describe its most recent occurrence, so this endpoint answers "what tasks does this kid have, and where does each stand right now?" rather than returning a full history.

Create Reward

POST /create-reward

Creates a new reward for a family's reward shop.

Request Body

FieldTypeRequiredDescription
familyIdUUIDYesThe family ID to create the reward for
namestringYesReward name (max 100 characters)
descriptionstringNoReward description (max 500 characters)
pointCostnumberYesPoints required to redeem (must be > 0)
categorystringYesReward category (see valid values below)
requiresApprovalbooleanNoParent must approve redemption (default true)
imageUrlstringNoURL to a reward image

Valid Categories

Example

curl -X POST \
  'https://tsspmgbvivrldppxlnkg.supabase.co/functions/v1/create-reward' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "familyId": "your-family-id",
    "name": "30 minutes of video games",
    "pointCost": 50,
    "category": "screen_time",
    "requiresApproval": false
  }'

Error Responses

StatusDescription
400Bad Request — missing or invalid fields
401Unauthorized — missing or invalid token
403Forbidden — you cannot create items for this family
404Not Found — user profile not found
405Method Not Allowed — only POST is supported
500Internal Server Error

All errors follow this format:

{
  "error": "Error message describing what went wrong",
  "details": "Additional details (optional)"
}

Code Examples

JavaScript / TypeScript

import { createClient } from '@supabase/supabase-js';

const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);

async function createTask(taskData) {
  const { data: { session } } = await supabase.auth.getSession();

  const response = await fetch(
    `${SUPABASE_URL}/functions/v1/create-task`,
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${session?.access_token}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(taskData),
    }
  );

  return response.json();
}

Python

import requests

SUPABASE_URL = "https://tsspmgbvivrldppxlnkg.supabase.co"

def create_task(access_token, task_data):
    response = requests.post(
        f"{SUPABASE_URL}/functions/v1/create-task",
        headers={
            "Authorization": f"Bearer {access_token}",
            "Content-Type": "application/json",
        },
        json=task_data,
    )
    return response.json()

Rate Limiting

The API uses Supabase's default rate limiting. For high-volume usage, consider implementing client-side throttling.

Support

For issues or questions about the API, email support@taski.kids.

← Back to TaskiKids