---
title: "Trigger a Mender deployment for a device"
method: POST
path: "/v1/edge/devices/{id}/deployments"
tags: ["Edge Devices"]
---

# Trigger a Mender deployment for a device

`POST /v1/edge/devices/{id}/deployments`

## Request

- Base URL: `https://api.hify.club`
- URL: `https://api.hify.club/v1/edge/devices/{id}/deployments`
- Auth: API key in header `X-User-Token`

Enqueues a Mender deployment for the device. For `type=config` a device config push is enqueued; for `type=code` an artifact deployment is enqueued and `artifact_name` is required.

## Request body

- object
  - `deployment` object, required
    - `type` 'code' | 'config', required: The kind of deployment to trigger.
    - `artifact_name` string: Mender artifact name; required when type is `code`.

## Response `202`

Deployment enqueued

- object
  - `enqueued` boolean
  - `type` string
  - `device_deployment_id` integer: Row that will track this deployment's Mender status.

## Other responses

- `400`: Bad request – type is missing/not one of code|config, or artifact_name is blank for type=code.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Device is decommissioned

## Changes

- **2026-11-05** `b5920403538d`: 1 info
  - added the non-success response with the status `409`

[Operation history](https://skmtc.dev/hify/apis/hify-apis/changes/v1/edge/devices/:id/deployments/post.md)

---

[API](https://skmtc.dev/hify/apis/hify-apis.md) - [All operations](https://skmtc.dev/hify/apis/hify-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/hify/apis/hify-apis/revisions/b5920403538d?raw)
