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

# cURL Examples

> Use the CubeStack API with cURL.

# cURL Examples

Quick reference for interacting with the CubeStack API using cURL.

## List Records

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_page=1&_pageSize=10" \
  -H "X-Api-Key: your-api-key"
```

## Get Single Record

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}/{id}" \
  -H "X-Api-Key: your-api-key"
```

## Create Record

```bash theme={null}
curl -X POST "https://api.cubestack.app/api/v1/{project}/{cube}" \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New Record",
    "content": "Record content"
  }'
```

## Update Record

```bash theme={null}
curl -X PUT "https://api.cubestack.app/api/v1/{project}/{cube}/{id}" \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Title"
  }'
```

## Delete Record

```bash theme={null}
curl -X DELETE "https://api.cubestack.app/api/v1/{project}/{cube}/{id}" \
  -H "X-Api-Key: your-api-key"
```

## Filtering

```bash theme={null}
# Exact match
curl "https://api.cubestack.app/api/v1/{project}/{cube}?status=eq:published" \
  -H "X-Api-Key: your-api-key"

# Multiple filters
curl "https://api.cubestack.app/api/v1/{project}/{cube}?status=eq:published&price=gt:50" \
  -H "X-Api-Key: your-api-key"
```

## Sorting

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_sort=created_at&_order=desc" \
  -H "X-Api-Key: your-api-key"
```

## Public Access (No Auth)

```bash theme={null}
curl "https://api.cubestack.app/api/v1/{project}/{cube}"
```
