Documentation 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.
The Get Project endpoint retrieves a single project by its ID alongside two related datasets: the complete deployment history (ordered from newest to oldest) and all environment variable keys associated with the project. This is the primary endpoint for building a project detail view or monitoring deployment progress.
GET /api/v1/projects/:id
Authentication
This endpoint requires an active session. Include your session cookie with every request. See Authentication for details on obtaining a session token.
Request
Path Parameters
The unique project ID (cuid). Obtain this from the List Projects endpoint.
Response
A successful 200 OK response returns the project with its deployments and environment variables embedded:
{
"message" : "Project fetched successfully" ,
"data" : {
"project" : Project & { deployments : Deployment [], envs : Env [] }
}
}
Response Fields
Human-readable status message — "Project fetched successfully".
Wrapper object containing the result payload. The full project object, including nested deployments and environment variables. Unique project identifier (cuid).
Display name for the project.
Full GitHub repository path, e.g. "owner/repo".
Branch used for production deployments.
Custom build command, or null if auto-detected.
Custom start command, or null if auto-detected.
Application root path within the repository, or null.
Auto-generated production URL after a successful deployment.
Custom hostname if configured, otherwise null.
Whether the custom domain has been DNS-verified.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
All deployments for this project, ordered by createdAt descending (newest first). Unique deployment identifier (cuid).
ID of the parent project.
Git branch that triggered this deployment.
Full SHA of the deployed commit, or null if not yet resolved.
Current lifecycle status. One of: PENDING, CLONING, DETECTING, ALLOCATING, BUILDING, DEPLOYING, SUCCESS, FAILED.
Deployment-specific URL once the container is live. null until deployment succeeds.
Internal container port assigned to this deployment. null until allocated.
Accumulated build and runtime log output. null if no logs are available yet.
Error message if the deployment failed. null on success or while in-progress.
ISO 8601 timestamp when the deployment record was created.
ISO 8601 timestamp of the most recent status update.
ISO 8601 timestamp when the deployment reached a terminal state (SUCCESS or FAILED). null while in-progress.
Environment variables associated with this project. Unique env record identifier (cuid).
Environment variable name, e.g. "DATABASE_URL".
Encrypted environment variable value (encrypted at rest).
ID of the parent project.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Deployment Status Reference
Status Description PENDINGDeployment has been queued but not yet started. CLONINGThe repository is being cloned from GitHub. DETECTINGThe framework and runtime are being auto-detected. ALLOCATINGA container port is being reserved. BUILDINGThe application is being built inside the container. DEPLOYINGThe built container is being started and routed. SUCCESSDeployment completed successfully and is live. FAILEDDeployment encountered an unrecoverable error.
Example
curl -X GET https://your-domain.com/api/v1/projects/clx4z2k0e0000abc123def456 \
-H 'Content-Type: application/json' \
-b 'better-auth.session_token=YOUR_SESSION_TOKEN'
Example response:
{
"message" : "Project fetched successfully" ,
"data" : {
"project" : {
"id" : "clx4z2k0e0000abc123def456" ,
"userId" : "user_01hxyz" ,
"name" : "My Next.js App" ,
"repositoryFullName" : "acme/my-nextjs-app" ,
"defaultBranch" : "main" ,
"buildCommand" : null ,
"startCommand" : null ,
"rootDirectory" : null ,
"deploymentUrl" : "https://my-nextjs-app.your-domain.com" ,
"customDomain" : null ,
"customDomainVerified" : false ,
"createdAt" : "2024-06-01T12:00:00.000Z" ,
"updatedAt" : "2024-06-10T09:30:00.000Z" ,
"deployments" : [
{
"id" : "clx5a3b1c0001xyz789ghi012" ,
"projectId" : "clx4z2k0e0000abc123def456" ,
"branch" : "main" ,
"commitHash" : "a1b2c3d4e5f6..." ,
"status" : "SUCCESS" ,
"url" : "https://my-nextjs-app.your-domain.com" ,
"port" : 3001 ,
"logs" : "Build completed in 42s..." ,
"error" : null ,
"createdAt" : "2024-06-10T09:00:00.000Z" ,
"updatedAt" : "2024-06-10T09:30:00.000Z" ,
"completedAt" : "2024-06-10T09:30:00.000Z"
}
],
"envs" : [
{
"id" : "clx5d4e2f0002pqr345stu678" ,
"key" : "DATABASE_URL" ,
"value" : "enc:v1:..." ,
"projectId" : "clx4z2k0e0000abc123def456" ,
"createdAt" : "2024-06-01T12:00:00.000Z" ,
"updatedAt" : "2024-06-01T12:00:00.000Z"
}
]
}
}
}
Error Responses
Status Error Message Description 401"Unauthorized"No valid session cookie was provided. 404"project not found"No project with the given ID exists, or it belongs to another user. 500"failed to fetch project"An unexpected server-side error occurred.