FugokuFugoku Docs
Mask

API Keys

Create and manage project-scoped API keys

API Keys

API keys provide programmatic access to the Fugoku API. They are scoped to a project and can be revoked at any time.

List API Keys

GET /v1/api-keys

Returns all API keys for the current project.

Response:

{
  "data": [
    {
      "id": "key-abc123",
      "type": "api-keys",
      "attributes": {
        "name": "Production CI",
        "prefix": "fgk_abc1",
        "expiresAt": "2027-01-01T00:00:00Z",
        "revoked": false,
        "createdAt": "2026-01-01T00:00:00Z",
        "lastUsedAt": "2026-07-31T12:00:00Z"
      }
    }
  ]
}

Note: The full API key is only shown once at creation time. The prefix field shows the first 8 characters for identification.

Create API Key

POST /v1/api-keys

Request Body:

{
  "name": "My API Key",
  "expiresAt": "2027-01-01T00:00:00Z"
}

Returns the full key value once. Store it securely.

Response:

{
  "data": {
    "id": "key-abc123",
    "type": "api-keys",
    "attributes": {
      "name": "My API Key",
      "key": "fgk_abc123...",
      "prefix": "fgk_abc1",
      "expiresAt": "2027-01-01T00:00:00Z",
      "createdAt": "2026-01-01T00:00:00Z"
    }
  }
}

Revoke API Key

DELETE /v1/api-keys/:id

Revokes an API key immediately. Returns 204 No Content.

Rotate API Key

POST /v1/api-keys/:id/rotate

Generates a new key value for the same API key record. Returns the new key value once.

Security

  • API keys are hashed using bcrypt before storage
  • Only the key prefix (first 8 chars) is stored in plaintext for lookup
  • Keys can be scoped to an expiration date
  • Revoked keys are permanently invalidated

On this page