Applications

Create Preview Deployment

Changed on

Open a preview deployment for a pull request and queue its deployment. When the preview already exists, it is redeployed. Git based applications need git_type unless they use a GitHub or GitLab App source; Bitbucket also needs commit. Docker Image applications need docker_tag for a new preview.

post/applications/{uuid}/previews

Request

  • Base URL: https://app.coolify.io/api/v1
  • URL: https://app.coolify.io/api/v1/applications/{uuid}/previews
  • Auth: HTTP bearer

Path parameters

uuidstring required

UUID of the application.

Request body

pull_request_idinteger required
pull_request_html_urlstring nullable
git_type'github' | 'gitlab' | 'gitea' | 'bitbucket' nullable

Git provider that hosts the pull request. Sets the ref Coolify fetches (pull/{id}/head or merge-requests/{id}/head).

commitstring nullable

Commit SHA to deploy. Required for Bitbucket.

docker_tagstring nullable

Docker image tag. Docker Image applications only.

forceboolean

Rebuild without cache.

instant_deployboolean

Queue a deployment. Set to false to only create the preview, for example to set its domains first.

Example request

{
  "pull_request_id": 42,
  "pull_request_html_url": "https://github.com/org/repo/pull/42"
}

Response

Existing preview deployment updated.

messagestring
deployment_uuidstring nullable

Changes