---
title: "Create deployment"
method: POST
path: "/v2/deploy.createDeployment"
tags: ["deploy"]
deprecated: true
---

# Create deployment

`POST /v2/deploy.createDeployment`

> **Deprecated.**

**INTERNAL** - This endpoint is internal and may change without notice.
Not recommended for production use.

Creates a new deployment for a project using either a pre-built Docker image or build context.

**Authentication**: Requires a valid root key with appropriate permissions.

## Request body

- V2DeployCreateDeploymentRequestBody — Create a deployment from a pre-built Docker image
  - `project` string, required — Project slug
  - `app` string, required — App slug within the project
  - `keyspaceId` string — Optional keyspace ID for authentication context
  - `branch` string, required — Git branch name
  - `environmentSlug` string, required — Environment slug (e.g., "production", "staging")
  - `dockerImage` string, required — Docker image reference to deploy
  - `gitCommit` V2DeployGitCommit — Optional git commit information
    - `commitSha` string — Git commit SHA
    - `commitMessage` string — Git commit message
    - `authorHandle` string — Git author handle/username
    - `authorAvatarUrl` string — Git author avatar URL
    - `timestamp` integer — Commit timestamp in milliseconds

## Response `201`

Deployment created successfully

- V2DeployCreateDeploymentResponseBody
  - `meta` Meta, required — Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
    - `requestId` string, required — A unique id for this request. Always include this ID when contacting support about a specific API request. This identifier allows Unkey's support team to trace the exact request through logs and diagnostic systems to provide faster assistance.
  - `data` V2DeployCreateDeploymentResponseData, required
    - `deploymentId` string, required — Unique deployment identifier

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `429` — Too Many Requests
- `500` — Internal server error

---

[API](https://skmtc.net/unkeyed/apis/unkey-api.md) · [All operations](https://skmtc.net/unkeyed/apis/unkey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unkeyed/unkey-api/revisions/9bbd42d710cf/schema)
