---
title: "Create a deployment"
method: POST
path: "/v1/default/deployments"
tags: ["deployments-api"]
---

# Create a deployment

`POST /v1/default/deployments`

## Request

- Base URL: `https://api.bymason.com`
- URL: `https://api.bymason.com/v1/default/deployments`
- Auth: API key in header `Authorization`

Creates a new deployment.

## Request body

- CreateDeploymentRequest: Request for creating a new Deployment.
  - `groupId` string, required: The unique id for the deployment group receiving the deployment.
  - `name` string, required: The name of the artifact being deployed.
  - `version` string, required: The version of the artifact being deployed.
  - `type` 'ota' | 'config' | 'apk', required
  - `push` boolean: If true, all devices in your deployment group will be notified of an update. Once the device is notified, it will apply the update. If false, the device will apply the update over the next 24 hours.
  - `deployInsecure` boolean: If true, the device will download the deployment over http. If false, the device will download the deployment over https.

## Response `200`

Create deployment response

- Deployment: A Deployment represents an artifact that will be installed on every device in a deployment group. An artifact is one of an APK, config, or Mason OS version.
  - `id` string, uuid: Unique identifier for the deployment
  - `artifact` DeployedArtifact: The artifact deployed to a group
    - `name` string: Name of the deployed artifact
    - `type` 'ota' | 'config' | 'apk'
    - `version` string: Version of the deployed artifact
  - `createdAt` string, date-time: Timestamp for when the deployment was created
  - `updatedAt` string, date-time: Timestamp for when the deployment was created
  - `groupId` string, uuid: The group id the deployment belongs to
  - `deployInsecure` boolean: Set to true for devices to download the update over http
  - `isActive` boolean: Whether the deployment is active or not

## Other responses

- `400`: Bad request
- `500`: Internal server error

---

[API](https://skmtc.dev/bymason/apis/mason-platform-apis-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-platform-apis-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-platform-apis-docs/revisions/365b123b04d4?raw)
