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

# Deploy a target

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

## Request

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

Publishes the project's saved editor files to this deploy target. Fetch the target afterward to check the latest deployment status.

## Response `200`

Deploy target published successfully

- DeployTargetDetailsResponse
  - `target` DeployTargetDetails, 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
    - `status` 'queued' | 'building' | 'ready' | 'error' | 'canceled' | 'unknown', required
    - `isDeployed` boolean, required: Whether the latest deployment attempt is ready.
    - `lastDeployedAt` string, date-time, nullable, required: Creation time of the latest ready deployment.

## 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)
