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
| Name | In | Type | Description |
|---|---|---|---|
project_id | path | string · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | Manageable keys | ApiKeyListResponse |
404 | Project 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
| Name | In | Type | Description |
|---|---|---|---|
project_id | path | string · required |
Request body
application/json · schema KeyCreate
| Field | Type | Description |
|---|---|---|
environment | "test" | "live" | |
scopes | array<"mail:send" | "build:create" | "build:android" | "build:read" | "build:cancel" | "artifact:read" | "source:publish" | "deploy:create"> · required | Exact least-privilege scopes. Service wildcards are intentionally excluded from the public contract. |
expires_at | string | |
name | string | |
restricted_domain | string | Verified sending domain of the project to which this key remains restricted. |
Responses
| Status | Description | Body |
|---|---|---|
201 | Key created | ApiKeyCreateResponse |
422 | scope_not_available: a requested scope is closed to this account | ScopeNotAvailableError |
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"]})