Skip to content
REST API

The HostStack REST API

Every button in the dashboard is a single HTTP call. Authenticate with a Bearer token, hit the endpoints below in any language, or use the typed TypeScript SDK when you prefer autocompletion over curl.

Authentication

Authenticate API requests with a Bearer token. Generate keys in Settings > API Keys.

Authorization: Bearer hs_live_your_api_key

Base URL & Errors

All endpoints use JSON. Errors return { "error": "message" } with the appropriate HTTP status code.

https://hoststack.dev/api
Rate Limit

Sensitive endpoints (auth, deploy triggers, credential rotations, deploy hooks) are individually rate-limited. Limited responses return HTTP 429 with X-RateLimit-Limit, X-RateLimit-Remaining, and Retry-After headers.

Endpoints

Auth

Public
POST
/api/auth/register
Create a new account
POST
/api/auth/login
Sign in with email/password
POST
/api/auth/logout
End current session
POST
/api/auth/forgot-password
Request password reset
POST
/api/auth/reset-password
Reset password with token

Projects

Bearer
GET
/api/projects/:teamId
List all projects
GET
/api/projects/:teamId/:projectId
Get project details
POST
/api/projects/:teamId
Create a project
PATCH
/api/projects/:teamId/:projectId
Update a project
DELETE
/api/projects/:teamId/:projectId
Delete a project

Services

Bearer
GET
/api/services/:teamId
List all services
GET
/api/services/:teamId/:serviceId
Get service details
POST
/api/services/:teamId
Create a service
PATCH
/api/services/:teamId/:serviceId
Update a service
DELETE
/api/services/:teamId/:serviceId
Delete a service
POST
/api/services/:teamId/:serviceId/suspend
Suspend a service
POST
/api/services/:teamId/:serviceId/resume
Resume a service

Deploys

Bearer
GET
/api/services/:teamId/:serviceId/deploys
List deploys
POST
/api/services/:teamId/:serviceId/deploys
Trigger a deploy
GET
/api/services/:teamId/:serviceId/deploys/:deployId
Get deploy details
GET
/api/services/:teamId/:serviceId/deploys/:deployId/logs
Get build logs
POST
/api/services/:teamId/:serviceId/deploys/:deployId/cancel
Cancel a deploy
POST
/api/services/:teamId/:serviceId/deploys/:deployId/rollback
Rollback to a deploy
POST
/api/services/:teamId/:serviceId/deploys/:deployId/promote
Promote to another environment

Databases

Bearer
GET
/api/databases/:teamId
List all databases
GET
/api/databases/:teamId/:databaseId
Get database details
POST
/api/databases/:teamId
Create a database
PATCH
/api/databases/:teamId/:databaseId
Update database settings
DELETE
/api/databases/:teamId/:databaseId
Delete a database
GET
/api/databases/:teamId/:databaseId/credentials
Get connection credentials
POST
/api/databases/:teamId/:databaseId/reset-password
Rotate database password

Domains

Bearer
GET
/api/domains/:teamId
List all domains
POST
/api/domains/:teamId
Add a domain
PATCH
/api/domains/:teamId/:domainId
Update domain settings
DELETE
/api/domains/:teamId/:domainId
Remove a domain
POST
/api/domains/:teamId/:domainId/verify
Verify DNS configuration

Env Vars

Bearer
GET
/api/services/:teamId/:serviceId/env
List env vars (secrets masked)
POST
/api/services/:teamId/:serviceId/env
Create an env var
PATCH
/api/services/:teamId/:serviceId/env/:envVarId
Update an env var
DELETE
/api/services/:teamId/:serviceId/env/:envVarId
Delete an env var
PUT
/api/services/:teamId/:serviceId/env/bulk
Bulk replace env vars

Volumes

Bearer
GET
/api/services/:teamId/:serviceId/volumes
List volumes attached to a service
POST
/api/services/:teamId/:serviceId/volumes
Attach a volume
PATCH
/api/services/:teamId/:serviceId/volumes/:volumeId
Resize / remount a volume
DELETE
/api/services/:teamId/:serviceId/volumes/:volumeId
Detach a volume

Environments

Bearer
GET
/api/projects/:teamId/:projectId/environments
List environments in a project
POST
/api/projects/:teamId/:projectId/environments
Create an environment
PATCH
/api/environments/:teamId/:environmentId
Update an environment
DELETE
/api/environments/:teamId/:environmentId
Delete an environment

Cron

Bearer
GET
/api/services/:teamId/:serviceId/cron-executions
List recent cron executions
GET
/api/services/:teamId/:serviceId/cron-executions/:executionId
Get a cron execution
POST
/api/services/:teamId/:serviceId/cron-executions/trigger
Trigger an ad-hoc cron run

Workflows

Bearer
GET
/api/projects/:teamId/:projectId/workflows
List workflows in a project
POST
/api/projects/:teamId/:projectId/workflows
Create a workflow (image + command + cron schedule)
GET
/api/teams/:teamId/workflows/:workflowId
Get a workflow
PATCH
/api/teams/:teamId/workflows/:workflowId
Update a workflow
DELETE
/api/teams/:teamId/workflows/:workflowId
Delete a workflow
POST
/api/teams/:teamId/workflows/:workflowId/trigger
Trigger an ad-hoc workflow run
GET
/api/teams/:teamId/workflows/:workflowId/runs
List workflow runs
GET
/api/teams/:teamId/workflows/runs/:runId
Get a workflow run
GET
/api/teams/:teamId/workflows/runs/:runId/logs
Stream a workflow run’s logs
POST
/api/teams/:teamId/workflows/runs/:runId/cancel
Cancel an in-flight run
POST
/api/teams/:teamId/workflows/runs/:runId/retry
Retry a failed run

Notifications

Bearer
GET
/api/notifications/:teamId/channels
List notification channels (Slack / Discord / email)
POST
/api/notifications/:teamId/channels
Create a notification channel
PATCH
/api/notifications/:teamId/channels/:channelId
Update a channel (event filter, recipients)
DELETE
/api/notifications/:teamId/channels/:channelId
Delete a channel
POST
/api/notifications/:teamId/channels/:channelId/test
Send a test event to a channel

Alerts

Bearer
GET
/api/alerts/:teamId
List recent alert-shaped activity (?aggregate=1 to collapse flapping rows)

DNS

Bearer
GET
/api/dns-zones/:teamId
List DNS zones managed on ns1+ns2.hoststack.dev
POST
/api/dns-zones/:teamId
Create a DNS zone
GET
/api/dns-zones/:teamId/:publicId
Get a DNS zone
DELETE
/api/dns-zones/:teamId/:publicId
Delete a DNS zone
GET
/api/dns-zones/:teamId/:publicId/records
List records in a zone
POST
/api/dns-zones/:teamId/:publicId/records
Create a record
PATCH
/api/dns-zones/:teamId/:publicId/records/:recordPublicId
Update a record
DELETE
/api/dns-zones/:teamId/:publicId/records/:recordPublicId
Delete a record

Activity Log

Bearer
GET
/api/activity-log/:teamId
List team audit-trail entries

Billing

Session
GET
/api/billing/:teamId/subscription
Get current subscription
GET
/api/billing/:teamId/usage
Get usage metrics
POST
/api/billing/:teamId/checkout
Create Stripe checkout session
POST
/api/billing/:teamId/portal
Create Stripe billing portal

Example request

bash
curl -X POST https://hoststack.dev/api/services/:teamId/:serviceId/deploys \
  -H "Authorization: Bearer hs_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"branch": "main"}'
Response (201 Created)
{
  "deploy": {
    "id": 42,
    "publicId": "dpl_abc123",
    "status": "building",
    "trigger": "api",
    "createdAt": "2026-04-07T12:00:00.000Z"
  }
}

Prefer a typed client? Use the TypeScript SDK for full autocompletion and error handling.

Essential cookies only — for login sessions. No tracking. Details