Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Create deployment

POSThttps://api.butterix.com/v1/sites/:site/deployments

Requires the editor role. There are two ways to use it:

  1. Upload source (used by biti deploy): the request body is a gzip tarball of the project directory (Content-Type: application/gzip, up to 200 MB). The x-biti-preview: 1 header creates a preview deployment, and x-biti-message is the URL-encoded deployment message.
  2. Rebuild from the repository: JSON { preview?, branch? }, building from the hosted repository or the connected Git repository. Not available for sites that have been uploaded with the CLI.

Returns 202 and the deployment id; poll its status with Get deployment.

Authentication

AuthorizationBearer

An organization API key, created in the console under Organization settings → API Keys, starting with biti_. It acts as editor and can't do anything that requires admin.

biti_sessionstring

The HttpOnly session cookie set on login. Requests that change data must be same-origin (the Origin header is checked) to prevent CSRF.

Path parameters

sitestringRequired

Site slug or id

Headers

x-biti-previewenumOptional

When uploading source: 1 for a preview deployment

Allowed values:
x-biti-messagestringOptional

When uploading source: URL-encoded deployment message

Request

This endpoint expects an object.
previewbooleanOptionalDefaults to false

Create a preview deployment instead of a production one

branchstringOptional

Branch to build; the site's production branch by default

Response

Queued
idstringOptional

Errors