---
title: "Enroll a host with an API key"
method: POST
path: "/host/enroll"
tags: ["Host Enrollment"]
---

# Enroll a host with an API key

`POST /host/enroll`

Creates a host owned by the user assigned to the API key. The user's encrypted data must be unlocked by an active sign-in.

## Request body

- object
  - `name` string
  - `ip` string, required
  - `port` integer
  - `username` string
  - `authType` 'none' | 'password' | 'key' | 'credential' | 'agent'
  - `password` string
  - `folder` string
  - `tags` union
    - string
    - string[]
  - `enableTerminal` boolean
  - `enableFileManager` boolean
  - `enableTunnel` boolean

## Response `200`

Host enrolled successfully.

## Other responses

- `400` — Invalid host data.
- `401` — Missing or invalid API key.
- `423` — The API key user's encrypted data is locked.
- `500` — Failed to enroll the host.

---

[API](https://skmtc.dev/termix/apis/termix-api.md) · [All operations](https://skmtc.dev/termix/apis/termix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/termix/termix-api/revisions/f4ef343eff1b/schema)
