Skip to main content

API Key Management

API keys provide programmatic access to SureStage for CI/CD pipelines, scripts, and integrations.

Types of API Keys

TypeScopeUse Case
PersonalSingle user's permissionsCLI authentication, personal scripts
OrganizationOrganization-wide accessCI/CD pipelines, shared integrations

Creating an API Key

Personal Key

  1. Go to Settings > API Keys
  2. Click Generate Personal Key
  3. Name the key (e.g., "CI Pipeline - staging")
  4. Set an expiration (optional)
  5. Copy the key (shown only once)

Organization Key

Requires Admin role

  1. Go to Settings > Organization API Keys
  2. Click Generate Key
  3. Name the key and set permissions scope
  4. Set an expiration
  5. Copy the key

Using API Keys

HTTP Header

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.surestage.com/v1/instances

CLI

surestage auth login --api-key YOUR_API_KEY

Environment Variable

export SURESTAGE_API_KEY=your_api_key

Revoking Keys

  1. Go to Settings > API Keys
  2. Click Revoke next to the key
  3. Confirm revocation

Revoked keys stop working immediately.

Next Steps