@devhelm/sdk package is a typed, promise-based client for the DevHelm REST API. It runs in any modern Node.js or browser environment, ships full TypeScript types, and uses Zod for runtime request/response validation.
Install
fetch).
Initialize
| Option | Type | Default | Description |
|---|---|---|---|
token | string | — | API token (Bearer). Required. |
baseUrl | string | https://api.devhelm.io | Override for self-hosted or testing. |
orgId | string | DEVHELM_ORG_ID env or "1" | Organization ID header. |
workspaceId | string | DEVHELM_WORKSPACE_ID env or "1" | Workspace ID header. |
Create a monitor
managedBy is optional — omit it (defaults to API server-side) or set it
explicitly to one of API, DASHBOARD, CLI, TERRAFORM, or MCP to
record the provenance for drift detection.
Request bodies are validated against the generated Zod schemas before any HTTP I/O — invalid payloads throw DevhelmValidationError with structured field errors.
List monitors
Update or delete a monitor
Get check results
Manage incidents
Create an alert channel
channelType discriminator inside config (slack, email, discord, pagerduty, …) — there is no top-level type field on this request.
Error handling
Resource namespaces
The client exposes 17 resources:| Namespace | Covers |
|---|---|
client.monitors | HTTP, DNS, TCP, ICMP, MCP, Heartbeat monitors + check results, versions |
client.incidents | Manual and auto-detected incidents |
client.forensics | Incident timelines, check traces, policy snapshots, rule evaluations |
client.alertChannels | Email, Slack, Discord, webhook, PagerDuty, OpsGenie, Teams |
client.notificationPolicies | Routing rules, schedules |
client.environments | Workspace environments (production, staging, …) |
client.secrets | Secret values consumed by monitor configs |
client.tags | Color-coded labels for monitors and incidents |
client.resourceGroups | Compose monitors and dependencies into logical units |
client.webhooks | Outbound event delivery |
client.apiKeys | Token issuance and revocation |
client.dependencies | Tracked third-party services for status pages |
client.services | Third-party service status catalog (search, live status, uptime, incidents) |
client.deployLock | Acquire / release / inspect the deploy lock |
client.maintenanceWindows | Scheduled alert-suppression windows |
client.status | Dashboard overview metrics |
client.statusPages | Status pages, components, groups, incidents, subscribers, custom domains |
Next steps
Client reference
Every method, signature, and return type.
Error handling
Exception classes and retry patterns.