REST API
API Reference
The HostStack REST API gives you programmatic access to every feature of the platform. Use it directly or via our TypeScript SDK.
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
API requests are limited to 100 requests/minute per API key. Rate-limited responses return HTTP 429 with a Retry-After header.
Endpoints
Auth
Public
POST
/api/auth/registerCreate a new accountPOST
/api/auth/loginSign in with email/passwordPOST
/api/auth/logoutEnd current sessionPOST
/api/auth/forgot-passwordRequest password resetPOST
/api/auth/reset-passwordReset password with tokenProjects
Bearer
GET
/api/projects/:teamIdList all projectsGET
/api/projects/:teamId/:projectIdGet project detailsPOST
/api/projects/:teamIdCreate a projectPATCH
/api/projects/:teamId/:projectIdUpdate a projectDELETE
/api/projects/:teamId/:projectIdDelete a projectServices
Bearer
GET
/api/services/:teamIdList all servicesGET
/api/services/:teamId/:serviceIdGet service detailsPOST
/api/services/:teamIdCreate a servicePATCH
/api/services/:teamId/:serviceIdUpdate a serviceDELETE
/api/services/:teamId/:serviceIdDelete a servicePOST
/api/services/:teamId/:serviceId/suspendSuspend a servicePOST
/api/services/:teamId/:serviceId/resumeResume a serviceDeploys
Bearer
GET
/api/services/:teamId/:serviceId/deploysList deploysPOST
/api/services/:teamId/:serviceId/deploysTrigger a deployPOST
/api/deploys/:teamId/:deployId/cancelCancel a deployPOST
/api/deploys/:teamId/:deployId/rollbackRollback to previousDatabases
Bearer
GET
/api/databases/:teamIdList all databasesGET
/api/databases/:teamId/:databaseIdGet database detailsPOST
/api/databases/:teamIdCreate a databaseDELETE
/api/databases/:teamId/:databaseIdDelete a databaseGET
/api/databases/:teamId/:databaseId/credentialsGet connection credentialsDomains
Bearer
GET
/api/domains/:teamIdList all domainsPOST
/api/domains/:teamIdAdd a domainPATCH
/api/domains/:teamId/:domainIdUpdate domain settingsDELETE
/api/domains/:teamId/:domainIdRemove a domainPOST
/api/domains/:teamId/:domainId/verifyVerify DNS configurationBilling
Session
GET
/api/billing/:teamId/subscriptionGet current subscriptionGET
/api/billing/:teamId/usageGet usage metricsPOST
/api/billing/:teamId/checkoutCreate Stripe checkout sessionPOST
/api/billing/:teamId/portalCreate Stripe billing 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 '{"clearCache": false}'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.