DeploymentsDeploy a preview

Deploy a preview

Publishes a branch to its own preview URL. The live site is untouched.

Requires editor or admin role. Returns 403 if your plan does not include preview deployments.

curl -X POST "https://api.documentationai.app/api/v1/deploy/preview" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "branch": "feature/new-docs",
  "commitSha": "example_string"
}'
{
  "deploymentId": "9f1c2e64-3b47-4a8d-91f5-7c2e0a6d5b31",
  "status": "pending",
  "url": "https://docs.acme.com",
  "branch": "example_string"
}
POST
/deploy/preview
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Content-Typestring
Required

The media type of the request body

Options: application/json
branchstring
Required

Branch to preview

Min length: 1
commitShastring

Specific commit to deploy. Defaults to the current head of the branch.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

Body

application/json
branchstring
Required

Branch to preview

Example:
feature/new-docs
commitShastring

Specific commit to deploy. Defaults to the current head of the branch.

Responses