API Keys

API keys grant programmatic access to your VeloxaHost account. Scope them to specific projects and permissions to follow the principle of least privilege.

Create an API Key

  1. Go to Account → API Keys → Create Key
  2. Give it a name (e.g., github-actions-deploy)
  3. Choose a scope (project-scoped or account-wide)
  4. Choose permissions: Read, Write, or Admin
  5. Optionally set an expiry date
  6. Copy the key immediately — it will not be shown again
⚠️

Store API keys in environment variables or a secret manager (e.g., GitHub Secrets, HashiCorp Vault). Never commit them to version control.

Using the API Key

Pass the key in the Authorization header:

# List instances
curl https://api.veloxahost.com/v1/instances \
  -H "Authorization: Bearer gh_live_YOUR_API_KEY"

# Create an instance
curl -X POST https://api.veloxahost.com/v1/instances \
  -H "Authorization: Bearer gh_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-app",
    "region": "vh-us-south-1",
    "plan": "basic-2",
    "image": "ubuntu-22.04"
  }'

Permission Scopes

ScopeCan do
ReadGET requests only — list and view all resources
WriteCreate, update, and delete resources. Cannot manage API keys or billing
AdminFull access including managing API keys, team members, and billing settings

Rotate a Key

To rotate a key without downtime:

  1. Create a new key with the same permissions
  2. Update your application/CI to use the new key
  3. Verify everything works
  4. Delete the old key

Revoke a Key

Delete a key immediately via Account → API Keys → Revoke or:

DELETE /v1/api-keys/key_abc123
Authorization: Bearer ADMIN_KEY

Revocation takes effect immediately — all requests using that key return 401 Unauthorized.

Related