Deployment API
The Deployment API handles deploying work websites to hosting providers. The API is provider-agnostic — it uses the active deployment plugin (e.g., Vercel) configured through the plugin system.
All endpoints require JWT authentication.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/deploy/providers | List available deployment providers |
GET | /api/deploy/providers/:providerId/configured | Check if a provider is configured for the current user |
POST | /api/deploy/works/:id | Deploy a work |
POST | /api/deploy/works/:id/check | Check if a work can be deployed |
POST | /api/deploy/works/:id/lookup | Look up existing deployment status |
POST | /api/deploy/works/:id/teams | List deployment teams for a work |
POST | /api/deploy/validate-token | Validate the current user's deployment token |
POST | /api/deploy/teams | List available deployment teams |
POST | /api/deploy/batch | Deploy multiple works at once |
Deploy a Work
Trigger a deployment for a specific work:
curl -X POST http://localhost:3100/api/deploy/works/:id \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"teamScope": "optional-team-id"}'
Body:
| Field | Type | Required | Description |
|---|---|---|---|
teamScope | string | No | Deploy under a specific team |
Check Deployment Capability
Check if the current user has the necessary provider configuration to deploy a work:
curl -X POST http://localhost:3100/api/deploy/works/:id/check \
-H "Authorization: Bearer <token>"
Validate Token
Validate the current user's configured deployment token:
curl -X POST http://localhost:3100/api/deploy/validate-token \
-H "Authorization: Bearer <token>"
Batch Deployment
Deploy multiple works at once:
curl -X POST http://localhost:3100/api/deploy/batch \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"works": [
{ "workId": "id-1", "teamScope": "optional-team" },
{ "workId": "id-2" }
],
"teamScope": "optional-default-team"
}'