The Trigger Deploy endpoint lets you manually kick off a new deployment for any existing project without pushing a commit to GitHub. The platform creates a fresh deployment record, decrypts the project’s stored environment variables, and adds a build job to the queue using the project’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt
Use this file to discover all available pages before exploring further.
defaultBranch and current build configuration. This is useful for re-deploying after updating environment variables, recovering from a failed deployment, or deploying on demand without a code change.
POST /api/v1/projects/:id/deploy
Authentication
This endpoint requires an active session and a connected GitHub account. Your GitHub OAuth access token is used to clone the repository during the build. See Authentication for details on obtaining a session token.
Request
Path Parameters
The unique project ID (cuid) of the project to deploy.
The deployment always uses the project’s configured
defaultBranch. To deploy a different branch, first update the project’s defaultBranch via the Update Project endpoint, then trigger a new deployment.Response
A successful201 Created response returns the newly queued deployment record:
Response Fields
Human-readable status message —
"Deployment queued successfully".Wrapper object containing the new deployment record.
Deployment Lifecycle
After this endpoint returns201, the deployment progresses asynchronously through the following stages:
| Status | Description |
|---|---|
PENDING | Queued and waiting for a worker to pick it up. |
CLONING | Cloning the repository from GitHub. |
DETECTING | Auto-detecting the framework (Next.js, Vite, Node.js, etc.). |
ALLOCATING | Reserving a container port for the application. |
BUILDING | Running the build command inside a Docker container. |
DEPLOYING | Starting the container and routing traffic. |
SUCCESS | Application is live and accessible. |
FAILED | Build or start encountered an unrecoverable error. |
status, logs, and url fields as it progresses.
Example
201 Created):
Error Responses
| Status | Error Message | Description |
|---|---|---|
401 | "Unauthorized" | No valid session cookie was provided. |
401 | "No GitHub access token found" | The authenticated user has not connected a GitHub account or the token has expired. |
404 | "Project not found or unauthorized" | No project with the given ID exists, or it belongs to another user. |
500 | "Internal server error" | An unexpected server-side error occurred, such as a queue connection failure. |