> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daycopilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Make your first API call to Day Copilot in under 5 minutes

## Prerequisites

Before you begin, make sure you have:

* A Day Copilot account ([sign up here](https://app.daycopilot.ai/signup))
* 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.

<Note>
  Your JWT token is sensitive! Never commit it to version control or share it publicly.
</Note>

## Step 2: Make Your First API Call

Let's fetch your tasks to verify everything is working.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://app.daycopilot.ai/api/v1/tasks" \
    -H "Authorization: Bearer YOUR_JWT_TOKEN" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.daycopilot.ai/api/v1/tasks', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${YOUR_JWT_TOKEN}`,
      'Content-Type': 'application/json'
    }
  });

  const tasks = await response.json();
  console.log(tasks);
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.daycopilot.ai/api/v1/tasks"
  headers = {
      "Authorization": f"Bearer {YOUR_JWT_TOKEN}",
      "Content-Type": "application/json"
  }

  response = requests.get(url, headers=headers)
  tasks = response.json()
  print(tasks)
  ```
</CodeGroup>

<Tip>
  Replace `YOUR_JWT_TOKEN` with your actual token from the Day Copilot dashboard.
</Tip>

## Step 3: Create Your First Task

Now let's create a new task:

<CodeGroup>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.daycopilot.ai/api/v1/tasks', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${YOUR_JWT_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'My First API Task',
      description: 'Created via the Day Copilot API',
      priority: 'medium',
      status: 'pending'
    })
  });

  const task = await response.json();
  console.log('Created task:', task);
  ```

  ```python Python theme={null}
  import requests
  import json

  url = "https://app.daycopilot.ai/api/v1/tasks"
  headers = {
      "Authorization": f"Bearer {YOUR_JWT_TOKEN}",
      "Content-Type": "application/json"
  }
  data = {
      "title": "My First API Task",
      "description": "Created via the Day Copilot API",
      "priority": "medium",
      "status": "pending"
  }

  response = requests.post(url, headers=headers, json=data)
  task = response.json()
  print("Created task:", task)
  ```
</CodeGroup>

## Step 4: Response Format

Successful requests return a JSON response:

```json theme={null}
{
  "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

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

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about OAuth 2.0 and token management
  </Card>

  <Card title="Core Concepts" icon="book" href="/concepts/architecture">
    Understand the architecture and data models
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all available endpoints
  </Card>

  <Card title="Guides" icon="map" href="/guides/first-api-call">
    Follow detailed implementation guides
  </Card>
</CardGroup>

## Need Help?

<Card title="Support" icon="life-ring" href="mailto:support@daycopilot.ai">
  Contact our support team if you run into any issues
</Card>
