Skip to main content
Version: 2.0

API keys

Available since v0.0.2

API keys provide user-level access to the servasec API. Unlike application tokens (which are scoped to a single application), API keys carry the permissions of the user who created them.

Keys are prefixed with sc_ to distinguish them from application tokens. The full key is only shown once at creation.

Create an API key

Send a name for the key. The response includes the full key value.

Use an API key

Pass the key in the X-Api-Key header when making API requests.

Revoke an API key

Revoking a key immediately invalidates it. Any requests using a revoked key are rejected.

Key comparison

FeatureApplication tokenAPI key
Prefix-sc_
ScopeSingle applicationUser-level (all permitted resources)
HeaderX-Api-TokenX-Api-Key
Use caseCI/CD ingestScripting, automation, custom integrations