Deploy & Alias Workflow
Create and manage deploys, then point an alias to a specific version for staged rollouts.
Create a deploy
Section titled “Create a deploy”Request: POST /v1/deploys
curl -X POST "$PRESS_CLOUD_API/v1/deploys" \ -H "Authorization: Bearer $PRESS_CLOUD_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "slug": "my-document", "name": "My Document" }'Response: 201 Created
{ "deploy": { "id": "dpl_abc123", "accountId": "acct_xyz", "slug": "my-document", "name": "My Document", "createdAt": 1745800000000 }}Next: After creation, upload artifacts via an upload session. The deploy is an empty shell until a version is committed.
Error handling: A 409 with deploy_slug_conflict means the slug is already in use. Choose a different slug.
Update a deploy
Section titled “Update a deploy”Request: PATCH /v1/deploys/{deployId}
curl -X PATCH "$PRESS_CLOUD_API/v1/deploys/dpl_abc123" \ -H "Authorization: Bearer $PRESS_CLOUD_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Renamed Document" }'Response: 200 OK
{ "deploy": { "id": "dpl_abc123", "accountId": "acct_xyz", "slug": "my-document", "name": "My Renamed Document", "createdAt": 1745800000000 }}Error handling: 404 if the deploy does not exist. 409 if the requested slug is already taken.
List deploys
Section titled “List deploys”Request: GET /v1/deploys
curl -H "Authorization: Bearer $PRESS_CLOUD_TOKEN" \ "$PRESS_CLOUD_API/v1/deploys"Response: 200 OK
{ "items": [ { "id": "dpl_abc123", "slug": "my-document", "name": "My Document", "createdAt": 1745800000000 } ]}Paginate with the cursor query parameter (see Cursor Pagination).
Point an alias to a version
Section titled “Point an alias to a version”Aliases (preview, production) let you route render jobs to specific versions without updating every caller.
Request: PUT /v1/deploys/{deployId}/aliases/{alias}
curl -X PUT "$PRESS_CLOUD_API/v1/deploys/dpl_abc123/aliases/production" \ -H "Authorization: Bearer $PRESS_CLOUD_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "deployVersionId": "dv_456" }'The deployVersionId can be a concrete version ID or the virtual pointer latest.
Response: 200 OK
{ "deployId": "dpl_abc123", "alias": "production", "deployVersionId": "dv_456", "updatedAt": 1745800100000}Next: Create a render job against this alias.
Error handling: 404 if the deploy or version does not exist. The alias is updated atomically — in-flight render jobs continue using the version they were created against.