Skip to main content

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.

Every request to the Vangrid API must include your API key as a Bearer token in the Authorization header. Requests without a valid key return 401 Unauthorized and are not processed.

Obtaining your API key

Contact hello@vangrid.io to request API access. Once your account is provisioned, your API key is available in the Vangrid dashboard under Settings → API Keys.

Passing your API key

Include your key in the Authorization header on every request:
Authorization: Bearer your-api-key
curl -X POST https://api.vangrid.io/v1/spatial/query \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"aoi": {"type": "Point", "coordinates": [-122.4194, 37.7749]}}'

Authentication errors

HTTP statusError codeCause
401unauthorizedKey is missing, malformed, or revoked
403region_not_authorizedKey is valid but not authorized for the requested region
Example 401 response:
{
  "error": "unauthorized",
  "message": "Invalid or missing API key. Include your key as Authorization: Bearer <key>."
}

Best practices

Never hard-code your API key in source code or commit it to version control.
  • Store your key in an environment variable: VANGRID_API_KEY
  • Use separate keys for development and production environments
  • Rotate keys periodically via the dashboard
  • Revoke compromised keys immediately from Settings → API Keys
If you suspect a key has been exposed, revoke it in the dashboard and issue a new one before updating your application config.