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

# API Reference

> Complete reference for the Drime Cloud API

## Base URL

All API endpoints are relative to:

```
https://app.drime.cloud/api/v1
```

## Authentication

All requests require a Bearer token in the `Authorization` header:

```bash theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```

<Card title="Learn more about authentication" icon="key" href="/authentication">
  See the authentication guide for details on obtaining and using tokens
</Card>

## Response Format

All responses are returned in JSON format with a consistent structure:

### Success Response

```json theme={null}
{
  "status": "success",
  "data": { ... }
}
```

### Error Response

```json theme={null}
{
  "status": "error",
  "message": "Description of the error",
  "errors": {
    "field_name": "Specific error message"
  }
}
```

## HTTP Status Codes

| Code  | Description                             |
| ----- | --------------------------------------- |
| `200` | Success                                 |
| `201` | Created                                 |
| `400` | Bad Request                             |
| `401` | Unauthorized - Invalid or missing token |
| `403` | Forbidden - Insufficient permissions    |
| `404` | Not Found                               |
| `422` | Validation Error                        |
| `500` | Server Error                            |

## Pagination

List endpoints support pagination with these parameters:

| Parameter | Type    | Default | Description    |
| --------- | ------- | ------- | -------------- |
| `page`    | integer | 1       | Page number    |
| `perPage` | integer | 50      | Items per page |

Paginated responses include:

```json theme={null}
{
  "data": [...],
  "current_page": 1,
  "last_page": 5,
  "per_page": 50,
  "total": 234,
  "from": 1,
  "to": 50
}
```

## Workspace Context

Many endpoints accept a `workspaceId` parameter:

* Use `0` for your personal/default workspace
* Use a specific workspace ID for team workspaces

```bash theme={null}
GET /drive/file-entries?workspaceId=0
```

## Rate Limiting

The API implements rate limiting to ensure fair usage. If you exceed the limit, you'll receive a `429 Too Many Requests` response.

<Tip>
  If you need higher rate limits for your application, contact our support team.
</Tip>

## API Categories

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/auth/login">
    Login, register, and manage tokens
  </Card>

  <Card title="Files & Folders" icon="folder" href="/api-reference/files/get-file-entries">
    Browse, create, and manage files
  </Card>

  <Card title="Uploads" icon="upload" href="/api-reference/uploads/upload-file">
    Upload files to the cloud
  </Card>

  <Card title="Sharing" icon="share" href="/api-reference/sharing/share-entry">
    Share files with others
  </Card>

  <Card title="Vault" icon="vault" href="/api-reference/vault/get-vault">
    Encrypted storage
  </Card>

  <Card title="Workspaces" icon="building" href="/api-reference/user/get-workspaces">
    Team collaboration
  </Card>
</CardGroup>
