Skip to main content

Prerequisites

Before you begin, make sure you have:
  • A Day Copilot account (sign up here)
  • Your API credentials (JWT token)
  • A tool to make HTTP requests (cURL, Postman, or your favorite programming language)

Step 1: Get Your API Token

After signing in to Day Copilot, you’ll receive a JWT token. This token authenticates all your API requests.
Your JWT token is sensitive! Never commit it to version control or share it publicly.

Step 2: Make Your First API Call

Let’s fetch your tasks to verify everything is working.
curl -X GET "https://app.daycopilot.ai/api/v1/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"
Replace YOUR_JWT_TOKEN with your actual token from the Day Copilot dashboard.

Step 3: Create Your First Task

Now let’s create a new task:
curl -X POST "https://app.daycopilot.ai/api/v1/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My First API Task",
    "description": "Created via the Day Copilot API",
    "priority": "medium",
    "status": "pending"
  }'

Step 4: Response Format

Successful requests return a JSON response:
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "My First API Task",
    "description": "Created via the Day Copilot API",
    "priority": "medium",
    "status": "pending",
    "createdAt": "2025-11-02T12:00:00Z",
    "updatedAt": "2025-11-02T12:00:00Z",
    "version_major": 1,
    "version_minor": 1,
    "is_published": true
  }
}

Common Response Codes

CodeMeaning
200Success - Request completed successfully
201Created - Resource created successfully
400Bad Request - Invalid request parameters
401Unauthorized - Missing or invalid authentication token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Rate Limited - Too many requests
500Server Error - Something went wrong on our end

Next Steps

Authentication

Learn about OAuth 2.0 and token management

Core Concepts

Understand the architecture and data models

API Reference

Explore all available endpoints

Guides

Follow detailed implementation guides

Need Help?

Support

Contact our support team if you run into any issues