Search Documentation
Search for a documentation page...
Publish API
REST API endpoints for triggering and monitoring store deployments.
Trigger a production deployment of your store programmatically — the API equivalent of the admin Publish button. Only stores with platform-managed deployments can use these endpoints.
Trigger Publish
Starts a production build and deployment of the store's main branch. Returns 202 immediately — poll GET /api/v1/publish/{deploymentId} to track progress.
This endpoint requires the store API key (sk-...). OAuth tokens are not accepted and will receive a 403.
Response (202)
| Field | Type | Description |
|---|---|---|
deploymentId | string | Deployment identifier (use to poll status) |
deploymentUrl | string | null | Preview URL for the deployment |
inspectorUrl | string | null | Vercel inspector URL for build details |
Errors
| Status | Description |
|---|---|
400 | Store does not have a platform-managed deployment |
403 | Publishing requires the store API key (OAuth tokens are rejected) |
404 | Store not found |
Get Publish Status
Returns the current status of a deployment started via POST /api/v1/publish. Only deployments belonging to the authenticated store are visible.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
deploymentIdOrUrl | string | Deployment ID (dpl_...) or URL from the publish response |
Response (200)
| Field | Type | Description |
|---|---|---|
id | string | Deployment identifier |
url | string | null | Deployment URL |
readyState | string | Current state of the deployment |
Ready States
| State | Description |
|---|---|
QUEUED | Deployment is queued and waiting to start |
BUILDING | Build is in progress |
INITIALIZING | Build finished, deployment is initializing |
READY | Deployment is live (terminal) |
ERROR | Build or deployment failed (terminal) |
CANCELED | Deployment was canceled (terminal) |
Poll this endpoint until readyState reaches a terminal state (READY, ERROR, or CANCELED).
Errors
| Status | Description |
|---|---|
400 | Store does not have a platform-managed deployment |
404 | Deployment not found or does not belong to this store |