---
title: "Assign arenas to a device"
method: POST
path: "/v1/edge/devices/{id}/assign-arenas"
tags: ["Edge Devices"]
---

# Assign arenas to a device

`POST /v1/edge/devices/{id}/assign-arenas`

## Request

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

## Request body

- object
  - `device` object, required
    - `arena_ids` integer[], required: Arena IDs to assign; replaces all existing assignments. Pass [] to clear.
    - `facility_id` integer: Facility to assign alongside the arenas. Only applied when the key is present; omit it to keep the device's current facility. The device must end up with a facility — supply this unless the device already has one. Every arena in arena_ids must belong to that facility.

## Response `200`

Arenas assigned; device tags synced to Mender

- Device
  - `id` integer
  - `mender_device_id` string, nullable
  - `mac_address` string, nullable
  - `status` 'pending' | 'accepted' | 'rejected' | 'preauthorized' | 'noauth' | 'decommissioned'
  - `facility_id` integer, nullable
  - `mender_attributes` object
  - `upload_mode` 'continuous' | 'on_demand'
  - `preview_generation_enabled` boolean
  - `archive_disk` boolean
  - `decommissioned_at` string, date-time, nullable
  - `arenas` object[]
  - `facility` object, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Missing arena_ids key
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable entity – the device has no facility (none set and none provided), the device is not yet accepted by Mender (facility cannot be assigned until it is), or one or more arenas do not belong to the device's facility.

## Changes

- **2026-11-05** `b5920403538d`: 2 breaking, 1 warning, 1 info
  - the response property `mac_address` became nullable for the status `200`
  - the response property `mender_device_id` became nullable for the status `200`
  - added the new `decommissioned` enum value to the `status` response property for the response status `200`
  - added the optional property `decommissioned_at` to the response with the `200` status

[Operation history](https://skmtc.dev/hify/apis/hify-apis/changes/v1/edge/devices/:id/assign-arenas/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)
