---
title: Register a device by code
description: "Enroll a device with a short activation code: the code the Register Device dialog's command carries, and how to mint one from the CLI or an MCP client."
---

The install command the Register Device dialog gives carries a short **activation code** (`?code=XXXX-XXXX` at the end of its address) rather than a long enrollment token. Because the code is a few characters, it can also be read out or typed on a device where pasting is awkward, such as a phone, a kiosk or a machine reached over a serial console.

## Mint a code

Open **Devices**, then **Register Device**. The dialog mints a code when it opens and shows the install command that uses it. The code enrolls one device and expires in 30 minutes; the **Reusable, many devices** switch gives a command many devices can use instead. From the CLI:

```bash
clika-cli enrollment-codes create --body '{}'
```

From an MCP client, `post_enrollment_codes` with an empty body does the same, and `get_install` with the code and the operating system returns the install command that uses it.

## Use it

Run the dialog's command on the device, or install the agent and give it the code when it asks. The device appears in the list within a minute, like a token enrollment, and is then an ordinary device of the organization.

A code can name an entitlement profile, so devices enrolled with it start with that profile's grants; see [Runtime licenses](../concepts/runtime-licenses.mdx#entitlement-profiles).

## Codes and tokens

An enrollment token, minted with `clika-cli enrollment-tokens create`, enrolls a device the same way ([Add your first device](../getting-started/first-benchmark/02-add-your-first-device.md#from-the-cli) shows the two commands). A device enrolled with a code runs benchmarks and deployments like one enrolled with a token.

## Related pages

- [Add your first device](../getting-started/first-benchmark/02-add-your-first-device.md): the dialog, platform by platform.
- [Device](../concepts/device.mdx): what a device is and how it joins.
- [Devices](../cli/devices.md): registering and driving devices from the CLI.
