Skip to main content

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

MethodEndpointDescription
GET/api/deploy/providersList available deployment providers
GET/api/deploy/providers/:providerId/configuredCheck if a provider is configured for the current user
POST/api/deploy/works/:idDeploy a work
POST/api/deploy/works/:id/checkCheck if a work can be deployed
POST/api/deploy/works/:id/lookupLook up existing deployment status
POST/api/deploy/works/:id/teamsList deployment teams for a work
POST/api/deploy/validate-tokenValidate the current user's deployment token
POST/api/deploy/teamsList available deployment teams
POST/api/deploy/batchDeploy 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:

FieldTypeRequiredDescription
teamScopestringNoDeploy 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"
}'