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

# Quickstart

> Start building with the Zochil API in under 5 minutes

## Authentication

All API requests require authentication using an access token. You can obtain an access token by registering as a developer or through the authentication endpoints.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.zochil.io/user/profile" \
    -H "access-token: your_access_token_here" \
    -H "device-id: your_device_id_here"
  ```

  ```javascript Node.js theme={null}
  const axios = require("axios");

  const response = await axios.get("https://api.zochil.io/user/profile", {
    headers: {
      "access-token": "your_access_token_here",
      "device-id": "your_device_id_here"
    }
  });

  console.log(response.data);
  ```

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

  headers = {
      'access-token': 'your_access_token_here',
      'device-id': 'your_device_id_here'
  }

  response = requests.get('https://api.zochil.io/user/profile', headers=headers)
  print(response.json())
  ```
</CodeGroup>

## Make Your First Request

Let's start by fetching your user profile:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.zochil.io/user/profile" \
    -H "access-token: YOUR_ACCESS_TOKEN" \
    -H "device-id: YOUR_DEVICE_ID" \
    -H "Content-Type: application/json"
  ```

  ```javascript Node.js theme={null}
  const fetchUserProfile = async () => {
    try {
      const response = await fetch("https://api.zochil.io/user/profile", {
        method: "GET",
        headers: {
          "access-token": "YOUR_ACCESS_TOKEN",
          "device-id": "YOUR_DEVICE_ID",
          "Content-Type": "application/json"
        }
      });

      const data = await response.json();
      console.log(data);
    } catch (error) {
      console.error("Error:", error);
    }
  };

  fetchUserProfile();
  ```
</CodeGroup>

## Response Format

All API responses follow a consistent structure:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "user@example.com",
    "name": "John Doe",
    "created_at": "2023-01-01T00:00:00Z"
  },
  "message": "Profile retrieved successfully"
}
```

## Error Handling

When something goes wrong, you'll receive an error response:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid access token"
  }
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Development Setup" icon="code" href="/development">
    Set up your local development environment
  </Card>

  <Card title="Authentication Guide" icon="key" href="/essentials/authentication">
    Learn about authentication methods and token management
  </Card>

  <Card title="Architecture Overview" icon="server" href="/architecture/overview">
    Understand the platform architecture
  </Card>

  <Card title="Error Codes" icon="exclamation-triangle" href="/essentials/errors">
    Understanding error responses and codes
  </Card>
</CardGroup>
