Service Keys

Create service key

Changed on

Create a new service role key for admin operations.

WARNING: Service keys bypass all RLS policies! Store securely and NEVER expose in frontend code.

post/projects/{id}/service-keys

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

Request body

object required
name, string required

Descriptive name for the key (e.g., "admin-dashboard", "background-jobs"). Can only contain letters, numbers, underscores, and hyphens.

permissions, string[]

Optional least-privilege scope for the key. When omitted, empty, or containing only blank strings, the key is granted full access ([""]) for backward compatibility. Provide an explicit list (e.g. ["functions.invoke", "locks.manage"]) to restrict the key; "" grants everything. Scope enforcement applies to function invocation, storage object operations, project locks, and server-side auth proxy metadata (auth.signin, auth.signup, auth.refresh, auth.logout, auth.password_reset). A key scoped to a list without "*" reads and stops a durable execution only with the client_token its start returned.

Example request

{
  "name": "admin-dashboard",
  "permissions": [
    "functions.invoke",
    "locks.manage"
  ]
}

Response

Service key created - save the key_value immediately!

ServiceKey required

Service role key for admin operations. WARNING: Bypasses all RLS - backend use only!

id, string uuid required
project_id, string uuid
name, string required

Descriptive name for the key

key_value, string

Full JWT token for Authorization header. Returned on create, get, and list (decrypted from storage). Store securely - NEVER expose in frontend code!

key_prefix, string required

First 12 characters of the key for display/identification

permissions, string[] required

Operations this key may perform. ["*"] grants full admin access (default for keys created without an explicit scope). Scoped keys list specific permissions, e.g. ["functions.invoke", "locks.manage"].

created_at, string date-time
updated_at, string date-time

Example response

{
  "permissions": [
    "*"
  ]
}

Changes

    • info

      the endpoint scheme security ProjectAccessToken was added to the API

    • breaking

      added the new path request parameter id

    • breaking

      the response's body type changed from no type to object for status

    8 more changes in this revision