Galon Cloud
Galon API v1

/projects/{project_id}/keys/browser/{key_id}

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

PATCH /projects/{project_id}/keys/browser/{key_id}

Change a browser key

Origins, daily cap or name; same id, same key. Scopes do not change: create another key. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.

Console session only (signed-in console).

Parameters

NameInTypeDescription
project_idpathstring · required
key_idpathstring · requiredBrowser key id.

Request body

application/json · schema BrowserKeyUpdate

FieldTypeDescription
originsarray<string>Sites allowed to use the key: example.com, *.example.com (subdomains), https://example.com:8443, localhost:3000. https only, except localhost.
daily_capintegerBilled units per UTC day.
namestringName.

Responses

StatusDescriptionBody
200browser_keyBrowserKey
409browser_key_revokedError
401unauthorized (session missing, expired or revoked)Error
403reserve_adminError
404not_found, project_not_found, browser_key_not_foundError
422browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)Error

Examples

curl

curl -X PATCH "$GALON_API_BASE/projects/<project_id>/keys/browser/<key_id>" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"origins": ["string"], "daily_cap": 1, "name": "string"}'