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_keyBase URL & Errors
All endpoints use JSON. Errors return { "error": "message" } with the appropriate HTTP status code.
https://hoststack.dev/apiRate 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/registerPOST
/api/auth/loginPOST
/api/auth/logoutPOST
/api/auth/forgot-passwordPOST
/api/auth/reset-passwordProjects
Bearer
GET
/api/projects/:teamIdGET
/api/projects/:teamId/:projectIdPOST
/api/projects/:teamIdPATCH
/api/projects/:teamId/:projectIdDELETE
/api/projects/:teamId/:projectIdServices
Bearer
GET
/api/services/:teamIdGET
/api/services/:teamId/:serviceIdPOST
/api/services/:teamIdPATCH
/api/services/:teamId/:serviceIdDELETE
/api/services/:teamId/:serviceIdPOST
/api/services/:teamId/:serviceId/suspendPOST
/api/services/:teamId/:serviceId/resumeDeploys
Bearer
GET
/api/services/:teamId/:serviceId/deploysPOST
/api/services/:teamId/:serviceId/deploysGET
/api/services/:teamId/:serviceId/deploys/:deployIdGET
/api/services/:teamId/:serviceId/deploys/:deployId/logsPOST
/api/services/:teamId/:serviceId/deploys/:deployId/cancelPOST
/api/services/:teamId/:serviceId/deploys/:deployId/rollbackPOST
/api/services/:teamId/:serviceId/deploys/:deployId/promoteDatabases
Bearer
GET
/api/databases/:teamIdGET
/api/databases/:teamId/:databaseIdPOST
/api/databases/:teamIdPATCH
/api/databases/:teamId/:databaseIdDELETE
/api/databases/:teamId/:databaseIdGET
/api/databases/:teamId/:databaseId/credentialsPOST
/api/databases/:teamId/:databaseId/reset-passwordDomains
Bearer
GET
/api/domains/:teamIdPOST
/api/domains/:teamIdPATCH
/api/domains/:teamId/:domainIdDELETE
/api/domains/:teamId/:domainIdPOST
/api/domains/:teamId/:domainId/verifyEnv Vars
Bearer
GET
/api/services/:teamId/:serviceId/envPOST
/api/services/:teamId/:serviceId/envPATCH
/api/services/:teamId/:serviceId/env/:envVarIdDELETE
/api/services/:teamId/:serviceId/env/:envVarIdPUT
/api/services/:teamId/:serviceId/env/bulkVolumes
Bearer
GET
/api/services/:teamId/:serviceId/volumesPOST
/api/services/:teamId/:serviceId/volumesPATCH
/api/services/:teamId/:serviceId/volumes/:volumeIdDELETE
/api/services/:teamId/:serviceId/volumes/:volumeIdGET
/api/services/:teamId/:serviceId/volumes/:volumeId/restore-pointsPOST
/api/services/:teamId/:serviceId/volumes/:volumeId/import-uploadPOST
/api/services/:teamId/:serviceId/volumes/:volumeId/restorePOST
/api/services/:teamId/:serviceId/volumes/:volumeId/migrate-to-blockMachines
Bearer
GET
/api/machines/:teamIdGET
/api/machines/:teamId/:machineIdDELETE
/api/machines/:teamId/:machineIdEnvironments
Bearer
GET
/api/projects/:teamId/:projectId/environmentsPOST
/api/projects/:teamId/:projectId/environmentsPATCH
/api/environments/:teamId/:environmentIdDELETE
/api/environments/:teamId/:environmentIdCron
Bearer
GET
/api/services/:teamId/:serviceId/cron-executionsGET
/api/services/:teamId/:serviceId/cron-executions/:executionIdPOST
/api/services/:teamId/:serviceId/cron-executions/triggerWorkflows
Bearer
GET
/api/projects/:teamId/:projectId/workflowsPOST
/api/projects/:teamId/:projectId/workflowsGET
/api/teams/:teamId/workflows/:workflowIdPATCH
/api/teams/:teamId/workflows/:workflowIdDELETE
/api/teams/:teamId/workflows/:workflowIdPOST
/api/teams/:teamId/workflows/:workflowId/triggerGET
/api/teams/:teamId/workflows/:workflowId/runsGET
/api/teams/:teamId/workflows/runs/:runIdGET
/api/teams/:teamId/workflows/runs/:runId/logsPOST
/api/teams/:teamId/workflows/runs/:runId/cancelPOST
/api/teams/:teamId/workflows/runs/:runId/retryNotifications
Bearer
GET
/api/notifications/:teamId/channelsPOST
/api/notifications/:teamId/channelsPATCH
/api/notifications/:teamId/channels/:channelIdDELETE
/api/notifications/:teamId/channels/:channelIdPOST
/api/notifications/:teamId/channels/:channelId/testAlerts
Bearer
GET
/api/alerts/:teamIdDNS
Bearer
GET
/api/dns-zones/:teamIdPOST
/api/dns-zones/:teamIdGET
/api/dns-zones/:teamId/:publicIdDELETE
/api/dns-zones/:teamId/:publicIdGET
/api/dns-zones/:teamId/:publicId/recordsPOST
/api/dns-zones/:teamId/:publicId/recordsPATCH
/api/dns-zones/:teamId/:publicId/records/:recordPublicIdDELETE
/api/dns-zones/:teamId/:publicId/records/:recordPublicIdActivity Log
Bearer
GET
/api/activity-log/:teamIdBilling
Session
GET
/api/billing/:teamId/subscriptionGET
/api/billing/:teamId/usagePOST
/api/billing/:teamId/checkoutPOST
/api/billing/:teamId/portalExample 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.