Galon Cloud
Galon API v1

/projects/{project_id}/keys

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

GET /projects/{project_id}/keys

List metadata of the project's keys

Never returns the secret or its fingerprint.

Console session only (signed-in console).

Parameters

NameInTypeDescription
project_idpathstring · required

Responses

StatusDescriptionBody
200Manageable keysApiKeyListResponse
404Project not found

Examples

curl

curl -X GET "$GALON_API_BASE/projects/<project_id>/keys" \
  -H "Authorization: Bearer $GALON_API_KEY"

Node.js (SDK)

import { Galon } from "galon";

const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.apiKeys.list({ limit: 20 });

Python (SDK)

from galon import Galon

galon = Galon()  # reads GALON_API_KEY
result = galon.api_keys.list({"limit": 20})

POST /projects/{project_id}/keys

Create an API key displayed only once

Console session only (signed-in console).

Parameters

NameInTypeDescription
project_idpathstring · required

Request body

application/json · schema KeyCreate

FieldTypeDescription
environment"test" | "live"
scopesarray<"mail:send" | "build:create" | "build:android" | "build:read" | "build:cancel" | "artifact:read" | "source:publish" | "deploy:create"> · requiredExact least-privilege scopes. Service wildcards are intentionally excluded from the public contract.
expires_atstring
namestring
restricted_domainstringVerified sending domain of the project to which this key remains restricted.

Responses

StatusDescriptionBody
201Key createdApiKeyCreateResponse
422scope_not_available: a requested scope is closed to this accountScopeNotAvailableError

Examples

curl

curl -X POST "$GALON_API_BASE/projects/<project_id>/keys" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scopes": ["mail:send"]}'

Node.js (SDK)

import { Galon } from "galon";

const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.apiKeys.create({"scopes": ["mail:send"]});

Python (SDK)

from galon import Galon

galon = Galon()  # reads GALON_API_KEY
result = galon.api_keys.create({"scopes": ["mail:send"]})