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

## Changes

> 90 revisions in range; 2 could not be searched.

- **2026-07-14** `43ad1ce9a152` — 2 info
  - the endpoint scheme security `bearer` was added to the API
  - the endpoint scheme security `rootKey` was removed from the API
- **2026-07-13** `de7b05f5cb37` — 1 info
  - endpoint deprecated
- **2026-03-06** `9761d653623c` — 2 breaking, 2 warning
  - added the new required request property `app`
  - added the new required request property `project`
  - removed the request property `appSlug`
  - removed the request property `projectId`
- **2026-03-06** `2263f5465964` — 1 info
  - added the new optional request property `appSlug`
- **2026-02-27** `551df53dd45d` — 1 info
  - added the non-success response with the status `429`

[Full history](https://skmtc.dev/unkeyed/apis/unkey-api/changes/v2/deploy.createDeployment/post.md)

---

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