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

# API Reference

> Complete reference for the Grantiva REST API

The Grantiva API is organized around REST. All requests and responses use JSON. The base URL is:

```
https://api.grantiva.io/api/v1/
```

## Health check

```bash theme={null}
curl https://api.grantiva.io/health
```

```json theme={null}
{
  "status": "healthy",
  "timestamp": "2025-03-10T12:00:00Z"
}
```

## Errors

All errors return a consistent format:

```json theme={null}
{
  "error": "not_found",
  "message": "Resource not found"
}
```

| Status | Description                                             |
| ------ | ------------------------------------------------------- |
| `400`  | Bad request — invalid input                             |
| `401`  | Unauthorized — missing or invalid authentication        |
| `403`  | Forbidden — insufficient permissions or inactive tenant |
| `404`  | Not found                                               |
| `409`  | Conflict — duplicate resource                           |
| `429`  | Rate limited                                            |
| `500`  | Server error                                            |

## Rate limiting

Rate limits vary by plan. When exceeded, the API returns `429 Too Many Requests`. Retry after the delay indicated in the response.

## Pagination

List endpoints support pagination:

```
?page=1&per=20
```

Responses include metadata:

```json theme={null}
{
  "items": [...],
  "metadata": {
    "page": 1,
    "per": 20,
    "total": 142
  }
}
```
