---
title: "Create Deployment"
method: POST
path: "/api/v1/deployments"
tags: ["Deployments"]
---

# Create Deployment

`POST /api/v1/deployments`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v1/deployments`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v1/deployments/post.ts> (a function with typed inputs; its response is checked against the schema)

**Create Deployment**

## Request body

- CreateDeploymentRequestModel
  - `repo_url` string, required: should be a qualified Git URL
  - `ref_name` string, required
  - `timestamp` string
  - `stage` string
  - `services` string[]

## Response `200`

Successful Response

- CreateDeploymentResponseModel
  - `request_id` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/linearb/apis/linearb-api.md) - [All operations](https://skmtc.dev/linearb/apis/linearb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linearb/apis/linearb-api/revisions/3aea06710db6?raw)
