Create API key
POST /v1/keysFreeWrites
Creates an API key for the organization and returns the secret once. Store it in an environment variable (GEOCODE_API_KEY); it cannot be shown again. The key acts in this organization only, with its creator's role (at most admin), and keeps working if the creator leaves until an admin revokes it.
MCP tool create_api_key · CLI geocode create-api-key · RPC POST /v1/ops/create_api_key
Input
| Field | Type | Description |
|---|---|---|
namebody | string | A label, e.g. the app or environment. Default "Default key". |
Example request
curl -X POST "https://geocodeai.dev/v1/keys" \
-H "Authorization: Bearer $GEOCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"production"}'Example response
See the description above for what this returns.
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 401 unauthorized, 429 rate_limited.