---
title: "Create an install token"
method: POST
path: "/host-install-tokens"
tags: ["Host install tokens"]
---

# Create an install token

`POST /host-install-tokens`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/host-install-tokens`
- Auth: HTTP bearer

The token is valid for 7 days. Give it to the agent's installer; Hosts → Add host in the
dashboard shows the full command for each platform.

## Response `201`

The new install token.

- HostInstallToken: An install token: agents use it to register hosts with the team. Any number of hosts can use one token until it expires or is revoked.
  - `id` string, uuid, required: Install token ID
  - `token` string, required: The token to give the agent's installer (`--token`)
  - `expires_at` string, date-time, nullable, required: When the token stops registering new hosts. Hosts that registered keep reporting
  - `created_at` string, date-time, required: When the token was created

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
