Skip to main content

Welcome to the Day Copilot API

The Day Copilot API is a REST API that allows you to programmatically manage tasks, events, and contexts. All endpoints are accessed via https://app.daycopilot.ai/api/v1/ and return JSON responses.

Interactive API Playground

All API endpoints in this reference include an interactive playground where you can test requests with your own authentication token.

Base URL

https://app.daycopilot.ai/api/v1

Authentication

All API requests require authentication via Bearer token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN

Get Started with Authentication

Learn how to obtain and use API tokens

API Resources

Day Copilot API is organized around three main resources:

Request Format

Headers

All requests should include:
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

Body

Request bodies use JSON format:
curl -X POST "https://app.daycopilot.ai/api/v1/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Complete API documentation",
    "priority": "high",
    "status": "pending"
  }'

Response Format

Success Responses

Successful responses return HTTP 200/201 with JSON data:
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "Complete API documentation",
    "priority": "high",
    "status": "pending",
    "createdAt": "2025-11-02T12:00:00Z",
    "updatedAt": "2025-11-02T12:00:00Z"
  }
}

List Responses

List endpoints include pagination metadata:
{
  "data": [
    { "id": "...", "title": "..." },
    { "id": "...", "title": "..." }
  ],
  "meta": {
    "pagination": {
      "limit": 50,
      "offset": 0,
      "total": 150,
      "hasMore": true
    }
  }
}

Error Responses

Errors return appropriate HTTP status codes with details:
{
  "error": "Validation Error",
  "message": "Field 'title' is required",
  "status": 400,
  "correlationId": "req_abc123xyz",
  "details": {
    "field": "title",
    "constraint": "required"
  }
}

HTTP Status Codes

CodeDescription
200OK - Request successful
201Created - Resource created successfully
400Bad Request - Invalid parameters or request body
401Unauthorized - Missing or invalid authentication
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
422Unprocessable Entity - Validation failed
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong
503Service Unavailable - Temporary outage

Pagination

List endpoints support pagination via query parameters:
GET /api/v1/tasks?limit=50&offset=100

Parameters

ParameterTypeDefaultDescription
limitinteger50Number of items to return (max 100)
offsetinteger0Number of items to skip

Response

{
  "data": [...],
  "meta": {
    "pagination": {
      "limit": 50,
      "offset": 100,
      "total": 250,
      "hasMore": true
    }
  }
}

Filtering & Searching

Filter by Context

GET /api/v1/tasks?context_id=550e8400-e29b-41d4-a716-446655440000

Search Tasks

GET /api/v1/tasks/search?q=urgent+meeting

Filter by Status

GET /api/v1/tasks?status=pending,in_progress

Sorting

Sort results using the sort parameter:
GET /api/v1/tasks?sort=-created_at,priority
  • Prefix with - for descending order
  • Multiple sort fields supported (comma-separated)
  • Default: -created_at

Versioning

The API uses URL-based versioning. Current version is v1:
https://app.daycopilot.ai/api/v1/*
Breaking changes will be released under a new version (e.g., /api/v2/). We’ll provide advance notice and migration guides for version changes.

Rate Limiting

All endpoints are rate-limited. See Rate Limits for details. Rate limit information is included in response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1699564800

Data Types

UUIDs

All resource IDs use UUID v4 format:
"id": "550e8400-e29b-41d4-a716-446655440000"

Timestamps

All timestamps are ISO 8601 formatted in UTC:
"createdAt": "2025-11-02T12:00:00Z"

Enums

Many fields accept only specific values:
// Task priority
type Priority = "low" | "medium" | "high" | "urgent";

// Task status
type Status = "pending" | "in_progress" | "completed" | "canceled";

Idempotency

POST and PUT requests support idempotency via the Idempotency-Key header:
curl -X POST "https://app.daycopilot.ai/api/v1/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -d '{"title": "..."}'
Requests with the same idempotency key will return the same response, preventing duplicate resource creation.

Webhooks (Coming Soon)

Subscribe to real-time events:
{
  "url": "https://your-app.com/webhooks/daycopilot",
  "events": ["task.created", "task.updated", "event.created"]
}

OpenAPI Specification

Download the complete OpenAPI 3.0 specification:

Download OpenAPI Spec

Use with Postman, Insomnia, or code generators

SDKs & Libraries

Official SDKs (coming soon):
  • JavaScript/TypeScript
  • Python
  • Go
Community SDKs:
  • PHP (maintained by community)
  • Ruby (maintained by community)

Getting Help

API Changelog

Stay up to date with API changes:

View Changelog

See recent updates and breaking changes