Skip to main content

API keys

All DevHelm API requests require a Bearer token in the Authorization header. API keys use the dh_live_ prefix and are scoped to your organization.

Creating an API key

  1. Open the DevHelm Dashboard
  2. Navigate to Settings → API Keys
  3. Click Create API Key and give it a descriptive name
  4. Copy the key immediately — it won’t be shown again

Required headers

REST API requests authenticated with an API key need a single header:
API keys are scoped to a single organization and workspace, so the key itself carries that context — no extra headers needed. The x-phelm-org-id / x-phelm-workspace-id headers only apply to session (JWT) tokens like the ones the dashboard uses, where one user can belong to multiple organizations.

Per-surface setup

CLI

The CLI resolves your API token from (in order of priority):
  1. --api-token flag
  2. DEVHELM_API_TOKEN environment variable
  3. Saved context in ~/.devhelm/contexts.json (set via devhelm auth login)
See CLI Authentication for details on contexts and interactive login.

TypeScript SDK

See TypeScript SDK quickstart for full setup.

Python SDK

See Python SDK quickstart for full setup.

Terraform Provider

See Terraform provider overview for full setup.

GitHub Action

See GitHub Actions integration for workflow examples.

MCP Server

See MCP server configuration for transport modes and advanced setup.

Security best practices

Store API keys in your CI/CD secrets manager or .env files that are gitignored. Never commit tokens to version control.
Create a new API key, update your environment, then revoke the old one. This can be done with zero downtime.
Create dedicated API keys for each environment. This makes it easier to audit usage and revoke keys if compromised.
Create dedicated API keys for production and staging. This makes it easier to audit usage and revoke keys if one is compromised.

Error responses

Next steps

API keys management

Create, rotate, and scope API keys.

Quickstart

Create your first monitor in under 5 minutes.