---
title: "Update a deploy target"
method: PATCH
path: "/projects/{projectId}/deploy-targets/{targetId}"
tags: ["Deploys"]
---

# Update a deploy target

`PATCH /projects/{projectId}/deploy-targets/{targetId}`

## Request

- Base URL: `https://api.grapesjs.com/v1`
- URL: `https://api.grapesjs.com/v1/projects/{projectId}/deploy-targets/{targetId}`
- Auth: HTTP bearer

Updates the mutable configuration of a deployment destination. The display name and primary custom domain can change; the target subdomain and provider cannot.

## Request body

- UpdateDeployTargetRequest
  - `displayName` string
  - `customDomain` string, nullable

## Response `200`

Deploy target updated successfully

- DeployTargetResponse
  - `target` DeployTarget, required
    - `id` string, required: Deploy target ID.
    - `providerId` 'default', required: Deploy provider identifier. Omit this field to use the default provider.
    - `subdomain` string, required: Immutable subdomain for the deploy target.
    - `displayName` string, nullable, required: Optional human-readable target label.
    - `customDomain` string, nullable, required: Optional primary custom domain attached to the target.
    - `deployedUrl` string, nullable, required: Preferred deployed URL, using the custom domain when present.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: Resource not found
- `500`: Server error

---

[API](https://skmtc.dev/grapesjs/apis/studio-platform-api.md) - [All operations](https://skmtc.dev/grapesjs/apis/studio-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grapesjs/apis/studio-platform-api/revisions/acc4ffe35e2d?raw)
