The Update Project endpoint allows you to modify one or more settings on an existing project without touching unspecified fields. You can rename the project, change build and start commands, adjust the root directory, switch the default branch, or attach and remove a custom domain — all in a single request by including only the fields you want to change.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.
PATCH /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) of the project to update.
Body Parameters
All body fields are optional. Include only the fields you wish to change.New display name for the project.
Path to the application root within the repository, relative to the repo root (e.g.
"apps/web"). Omit or set to null to use the repository root.Custom build command that overrides auto-detection (e.g.
"npm run build:prod"). Set to null to revert to auto-detection.Custom start command that overrides auto-detection (e.g.
"node dist/server.js"). Set to null to revert to auto-detection.Git branch to use for future production deployments (e.g.
"develop").A custom hostname to attach to this project (e.g.
"app.example.com"). Pass null or an empty string to remove an existing custom domain.Domain validation rules: The value must be a valid hostname — no wildcards (
*), no path segments (/), and no protocol prefix (https://). For example, "app.example.com" is valid while "*.example.com" or "example.com/app" are not. The domain is also normalised to lowercase and must be unique across all projects on the platform. Setting a new custom domain resets customDomainVerified to false until DNS propagation is confirmed.Response
A successful200 OK response returns the fully updated project object:
Response Fields
Human-readable status message —
"Project updated successfully".Wrapper object containing the updated project.
Example
Error Responses
| Status | Error Message | Description |
|---|---|---|
400 | "Invalid domain format. Please provide a valid hostname (e.g., app.example.com)." | The supplied customDomain value failed hostname validation. |
400 | "Domain is already in use by another project." | The normalised domain is already attached to a different project. |
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 update project" | An unexpected server-side error occurred. |