Skip to content

Deployments

Deployments operations in the Hlix API.

See the OpenAPI document for schemas and operation IDs.

  • Protected operations require an API key in x-api-key or a browser session cookie; some actions require a verified user session
  • Tenant-scoped operations use X-Organization-Id; browser sessions can use their active workspace. Discovery and personal-workspace bootstrap do not require an active workspace
  • The base URL for your deployment, https://server.hlix.ai by default
Method Path Operation
GET /v1/api/deployments List deployments
POST /v1/api/deployments Deploy a project to production
GET /v1/api/deployments/{id} Get one deployment
POST /v1/api/deployments/{id}/touch Extend a preview’s time to live
GET /v1/api/deployments/custom-domain Check the production deployment’s custom domain
PUT /v1/api/deployments/custom-domain Connect or remove the production deployment’s custom domain

GET /v1/api/deployments · operation ID listDeployments

Parameters

Name In Required Type Description
projectId query no string Only this project’s deployments.
kind query no string project (canonical preview), cycle-preview or production. Unrecognized values are ignored and leave the list unfiltered.
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.
X-Client-Portal header no string The agency Workspace ID for a signed-in client’s portal requests. A verified user session and portal membership are required; API keys cannot authenticate portal access. This header does not grant agency administration access.

Responses

Status Body Description
200 Deployment[] Matching deployments, oldest first.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist.

POST /v1/api/deployments · operation ID deployProduction

Parameters

Name In Required Type Description
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.

Request body — application/json, DeployProduction (required)

Property Type Required Notes
minInstances number | number no
projectId string yes min length 1
repoId string no min length 1

Responses

Status Body Description
202 DeploymentAccepted Handed to the pipeline. The row moves through building → deploying → live on its own; poll GET /deployments/{id}.
400 ValidationError | ApiError The JSON body failed validation — projectId is required — or the request named no active organization. Validation runs as middleware, so a malformed payload is answered 400 even when previews are switched off.
401 ApiError No valid session or API key.
403 ExternalPublishingRefusal | ApiError The workspace restricts publishing to a higher role than the caller’s (code: EXTERNAL_PUBLISHING_RESTRICTED), or the caller is a client.
404 ApiError No such project, or no such repository on it.
409 DeploymentRepoAmbiguous The project is archived, or it builds against several repositories and names no primary. Unarchive it or retry with repoId — repos is present only in the second case.
503 ApiError Preview deployments are switched off for this deployment of hlix.

GET /v1/api/deployments/{id} · operation ID getDeployment

Parameters

Name In Required Type Description
id path yes string
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.
X-Client-Portal header no string The agency Workspace ID for a signed-in client’s portal requests. A verified user session and portal membership are required; API keys cannot authenticate portal access. This header does not grant agency administration access.

Responses

Status Body Description
200 Deployment The deployment row.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError No such deployment in this workspace.

POST /v1/api/deployments/{id}/touch · operation ID touchDeployment

Parameters

Name In Required Type Description
id path yes string
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.
X-Client-Portal header no string The agency Workspace ID for a signed-in client’s portal requests. A verified user session and portal membership are required; API keys cannot authenticate portal access. This header does not grant agency administration access.

Responses

Status Body Description
200 DeploymentTouched The TTL was extended. A project’s canonical preview has no TTL, and touching it changes nothing.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError No such deployment in this workspace.

Check the production deployment’s custom domain

Section titled “Check the production deployment’s custom domain”

GET /v1/api/deployments/custom-domain · operation ID getProductionCustomDomain

Parameters

Name In Required Type Description
projectId query yes string The project whose custom domain to check.
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.
X-Client-Portal header no string The agency Workspace ID for a signed-in client’s portal requests. A verified user session and portal membership are required; API keys cannot authenticate portal access. This header does not grant agency administration access.

Responses

Status Body Description
200 CustomDomainStatus The domain’s state, or domain: null when none is set.
400 ApiError projectId is missing.
401 ApiError No valid session or API key.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError No such project.
503 ApiError Custom domains are unavailable or the check failed.

Connect or remove the production deployment’s custom domain

Section titled “Connect or remove the production deployment’s custom domain”

PUT /v1/api/deployments/custom-domain · operation ID setProductionCustomDomain

Parameters

Name In Required Type Description
X-Organization-Id header no string The workspace (organization) to act in. Omitted, the session’s active organization is used.

Request body — application/json, CustomDomain (required)

Property Type Required Notes
domain string | null yes
projectId string yes min length 1

Responses

Status Body Description
200 CustomDomainStatus Connected (with the DNS records to add) or removed.
400 ValidationError | ApiError The body failed validation, or the domain is an hlix address.
401 ApiError No valid session or API key.
403 ExternalPublishingRefusal | ApiError Connecting a domain is refused when the workspace restricts publishing to a higher role than the caller’s (code: EXTERNAL_PUBLISHING_RESTRICTED). Removing a domain is never refused for that reason.
404 ApiError No such project.
409 ApiError Another project already holds this domain.
503 ApiError Custom domains are unavailable or the zone call failed.

The response table for each operation lists its documented errors. Common status codes include:

  • 400 — the body failed schema validation, or the request named no active organization. A ValidationError body carries the failing fields; an ApiError body carries only error.
  • 401 — no valid session or API key.
  • 403 — authenticated, but not a member of the named organization, or a client collaborator without the required access.
  • 404 — check the resource ID and your access to the selected Workspace.
  • 409 — the expected revision or state is stale, or another operation currently owns the transition.
  • 500 — the operation failed server-side. Retry only where an idempotency key makes that safe.