API Reference
REST API for programmatic deployment and management.
Authentication
All API requests require a Bearer token. Create tokens in your dashboard at gethatch.eu/dashboard/tokens.
Authorization: Bearer <your-api-token>Base URL
https://api.gethatch.eu/All API endpoints are served via Nuxt server routes at this base path.
POST /deploy
Trigger a new deployment for an existing egg. Typically deployments are triggered by hatch deploy, but you can also trigger them via the API.
POST https://api.gethatch.eu/deploy
Authorization: Bearer <token>
Content-Type: application/json
{
"project": "myapp",
"env": {
"DATABASE_URL": "postgres://...",
"API_KEY": "sk-..."
}
}Response:
{
"id": "deploy_abc123",
"status": "building",
"url": "https://myapp-xxxx.nest.gethatch.eu",
"created_at": "2025-01-15T10:30:00Z"
}GET /deployments
List all deployments for your account.
GET https://api.gethatch.eu/deployments
Authorization: Bearer <token>Query parameters:
projectFilter by project namestatusFilter by status: building, live, failedlimitNumber of results (default: 20, max: 100)GET /deployments/:id
Get details of a specific deployment.
GET https://api.gethatch.eu/deployments/deploy_abc123
Authorization: Bearer <token>DELETE /deployments/:id
Delete a deployment and remove it from your project.
DELETE https://api.gethatch.eu/deployments/deploy_abc123
Authorization: Bearer <token>GET /deployments/:id/logs
Retrieve build and runtime logs for a deployment.
GET https://api.gethatch.eu/deployments/deploy_abc123/logs
Authorization: Bearer <token>Query parameters:
typebuild or runtime (default: both)sinceISO 8601 timestamp to filter logs after