---
title: "Create deployment"
method: POST
path: "/applications/v1/deployments"
tags: ["Applications Deployments"]
---

# Create deployment

`POST /applications/v1/deployments`

Creates a deployment for an existing project by fetching repository files from GitHub and uploading them to the hosting provider. Use ref to deploy a branch, tag, or commit other than the project default branch.

## Request body

- object
  - `projectId` string, required — Project ID to deploy
  - `target` 'production' | 'preview' — Deployment target environment
  - `ref` string — Git branch, tag, or commit to deploy. Defaults to the project branch.

## Response `200`

Deployment started successfully

## Other responses

- `400` — Project configuration is invalid or GitHub access is missing
- `401` — Invalid API key
- `403` — API key does not have access to compute service
- `404` — Project not found

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/ff4b6844ccdf/schema)
