All guides
API · 4 min · Intermediate

Generate and Use API Keys

Create a personal API key and use it from a script, CI job, or local CLI.

API keys give a script the same permissions as you. They're what you use from CI, cron jobs, monitoring scripts, or any program that needs to call the platform on your behalf.

Create a key

  1. Account → API Keys → New Key.
  2. Name it after where you'll use it (e.g. github-actions-deploy).
  3. Copy the key once. The platform never shows it again — only a 4-character preview.

Use it

bash
export SPARKCLOUD_TOKEN="sc_live_..."
curl https://<your-platform>/api/v1/account \
  -H "Authorization: Bearer $SPARKCLOUD_TOKEN"

Rotate

When a key is compromised, or just stale, revoke it from the API Keys page. Affected scripts will start getting 401 immediately — generate a new key and redeploy.