Update project
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"auto_deploy_enabled":true,"build_command":"example","default_branch":"example","framework":"nextjs","git_provider":"github","git_repo_url":"example","git_token":"example","mr_previews_enabled":true,"name":"example","output_dir":"example","package_manager":"npm","preview_branch_exclude":["example"],"preview_branch_include":["example"],"preview_branch_mode":"example","root_directory":"example","skip_git_validation":true,"subdomain":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.deploybase.eu/api/v1/api/v1/projects/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "auto_deploy_enabled": true, "build_command": "example", "default_branch": "example", "framework": "nextjs", "git_provider": "github", "git_repo_url": "example", "git_token": "example", "mr_previews_enabled": true, "name": "example", "output_dir": "example", "package_manager": "npm", "preview_branch_exclude": [ "example" ], "preview_branch_include": [ "example" ], "preview_branch_mode": "example", "root_directory": "example", "skip_git_validation": true, "subdomain": "example" }'Updates an existing project (partial update)
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Project ID (UUID)
Request Body
Section titled “ Request Body ”Project updates
object
Whether merge/pull request events build previews. Independent of the branch policy.
Replaces the exclude list, evaluated before the include list. Send [] to clear it.
Replaces the include list. Send [] to clear it. Maximum 32 patterns.
Which webhook pushes auto-build a preview: “all”, “none” (only the default branch) or “custom”. Each policy field is independently optional; an omitted one keeps its stored value. The default branch always builds.
Responses
Section titled “ Responses ”OK
object
object
object
Auto-deploy (GitHub webhook) fields
Optional FK to team_git_connections; nil = manual PAT
MRPreviewsEnabled governs merge/pull-request previews on its own: the branch policy above never applies to an MR event.
PackageManager overrides the Node package manager used at build time. nil = auto-detect (lockfile / packageManager field); set = user override.
Preview branch policy (DEP-287). Decides which webhook pushes auto-build a preview; see ShouldAutoBuildBranch in preview_branch_policy.go. Nothing here touches manual/API/MCP/ZIP deploys, and the default branch is never filtered.
Production URL fields
Example
{ "data": { "framework": "nextjs", "package_manager": "npm", "preview_branch_mode": "all", "status": "active" }}Bad Request
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Not Found
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}