Create or update a preview deployment for a specific branch to review documentation changes before merging to production.
curl --request POST \
--url https://api.mintlify.com/v1/project/preview/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>"
}
'{
"statusId": "<string>",
"previewUrl": "<string>"
}statusId that you can pass to Get deployment status to track the deployment progress.
The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.
The name of the Git branch to create a preview deployment for.
1Preview deployment queued successfully.
The status ID for tracking the preview deployment. Use this with the Get deployment status endpoint.
The URL where the preview deployment is hosted.
Was this page helpful?
curl --request POST \
--url https://api.mintlify.com/v1/project/preview/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>"
}
'{
"statusId": "<string>",
"previewUrl": "<string>"
}