Authentication
Create an API key in the dashboard, send it with every request, and what each error means.
Every request needs an API key from your organization. Create one in the dashboard (you need a verified email), then send it in either form:
| Where | Form |
|---|---|
| Header (preferred) | Authorization: Bearer <key> |
| Query parameter | ?apiKey=<key> |
curl -s "https://api.data.graphitelab.ai/v1/geocode/search?text=Ottawa" \
-H "Authorization: Bearer $GRAPHITE_API_KEY"Keep your key secret. Anyone with it spends your rivets. If a key leaks, delete it in the dashboard and create a new one.
The playground in the dashboard signs in by organization, so you do not paste a key there.
Errors
Errors are JSON, see the error shape.
| Status | Code | Meaning |
|---|---|---|
| 401 | The key is missing or wrong. | |
| 402 | insufficient_rivets | Your organization is out of rivets. Buy a pack. |
| 402 | no_plan | Your organization has no rivets yet. Buy a pack. The body includes pricing_url. |
| 403 | Your organization does not have data API access. | |
| 429 | Over your requests-per-minute limit. Slow down and retry. |
Rate limit
Each key may make 60 requests per minute when your organization has a Graphite Lab plan, and 20 requests per minute without one. Over the limit the API returns 429; wait for the minute to roll over and retry. Each request also costs 1 rivet, see Pricing.