Skip to main content

Keys

Mint, list and revoke scoped API keys in the caller's org.

MethodPathScopeSummary
GET/keys/adminList Keys
POST/keys/adminCreate Key
DELETE/keys/{key_id}adminRevoke Key

Try it

curl -sf -H "Authorization: Bearer $VIGIL_KEY" "$VIGIL_URL/keys/" # admin key

Routes

GET /keys/

List Keys. Scope: admin.

Response 200:

[
{
"id": 0,
"name": "string",
"key_prefix": "string",
"scopes": [
"string"
],
"created_at": "string",
"last_used_at": "string | null",
"revoked": true,
"revoked_at": "string | null"
}
]

POST /keys/

Create Key. Scope: admin.

Request body:

{
"name": "string",
"scopes": [
"string"
],
"org_slug": "string | null"
}
FieldTypeRequiredNotes
namestringyes
scopesarray of stringno
org_slugstring | nullno

Response 200:

{
"id": 0,
"name": "string",
"key_prefix": "string",
"scopes": [
"string"
],
"created_at": "string",
"last_used_at": "string | null",
"revoked": true,
"revoked_at": "string | null",
"full_key": "string"
}

DELETE /keys/{key_id}

Revoke Key. Scope: admin.

ParameterInRequiredTypeNotes
key_idpathyesinteger

Response 200:

"any"

Generated from openapi.json (VIGIL 0.2.0). Scopes follow the router dependencies in VIGIL_SPEC.md section 4.2.