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

# API overview

> The Enterprise Spatial API: query, ingest, stream and verify.

> [!NOTE]
>
> The API is in early access and is not publicly available. Endpoint URLs, request examples and sample responses on this page are illustrative. Contact [hello@vangrid.io](mailto:hello@vangrid.io) to request access.

The Vangrid Enterprise Spatial API is a REST API that exposes the full power of the Vangrid edge network to your applications. Use it to query real-time spatial observations for any area of interest, ingest data from your own sensors, and subscribe to live ground truth streams.

## Base URL

All API requests are made to:

```text theme={"dark"}
https://api.vangrid.io/v1
```

## Authentication

Every request requires a Bearer token in the `Authorization` header:

```text theme={"dark"}
Authorization: Bearer your-api-key
```

See [API Authentication](https://docs.vangrid.io/api/authentication.md) for details on obtaining and managing your API key.

## Request and response format

All request bodies and responses use JSON. Set `Content-Type: application/json` on requests with a body.

Successful responses return HTTP `200` with a JSON body. Errors return the appropriate HTTP status code and a JSON error object:

```json theme={"dark"}
{
  "error": "error_code",
  "message": "Human-readable description of the error."
}
```

## Rate limits

Rate limits depend on your plan tier. The current limit is included in every response via headers:

| Header | Description |
| - | - |
| `X-RateLimit-Limit` | Maximum requests per minute |
| `X-RateLimit-Remaining` | Requests remaining in the current window |
| `X-RateLimit-Reset` | Unix timestamp when the window resets |

When you exceed your rate limit, the API returns `429 Too Many Requests`.

## Endpoints

> [card] [Spatial Queries](https://docs.vangrid.io/api/spatial-queries.md)
>
> Query ground truth observations for a geographic area of interest.

> [card] [Data Ingestion](https://docs.vangrid.io/api/data-ingestion.md)
>
> Submit observations from your own sensors into the Vangrid network.

> [card] [Streaming](https://docs.vangrid.io/api/streaming.md)
>
> Subscribe to real-time ground truth updates for a defined zone.

> [card] [Authentication](https://docs.vangrid.io/api/authentication.md)
>
> Manage API keys and understand authentication requirements.

## Common error codes

| Code | HTTP status | Meaning |
| - | - | - |
| `unauthorized` | 401 | Missing or invalid API key |
| `region_not_authorized` | 403 | AOI outside your authorized regions |
| `invalid_geometry` | 400 | Malformed GeoJSON in request |
| `aoi_too_large` | 400 | Area of interest exceeds maximum size |
| `rate_limit_exceeded` | 429 | Too many requests |
| `internal_error` | 500 | Unexpected server error, contact support |

> [!NOTE]
>
> To request access or upgrade your plan, contact [hello@vangrid.io](mailto:hello@vangrid.io).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.