---
title: "Ask to link a computer (no auth)"
method: POST
path: "/api/v1/device_links"
tags: ["Devices"]
---

# Ask to link a computer (no auth)

`POST /api/v1/device_links`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/device_links`
- Auth: none required

The computer sends only its armored openpgp PUBLIC key and a name. Salt checks the armor header and size, not the key itself. Returns the link id and a `poll_secret` (shown once; only its digest is stored) for the claim. A link lives 15 minutes. The computer shows a QR code of `https://saltapp.ai/link/<id>/<fingerprint>` for a signed-in client to approve.

## Request body

- object
  - `public_key` string, required: Armored PGP public key block.
  - `name` string, required
  - `kind` 'computer' | 'reader' | 'browser' | 'agent'
  - `agent_name` string: kind=agent only: the new agent's display name (default: name).

## Response `201`

Created.

- object
  - `id` string
  - `poll_secret` string
  - `expires_at` string, date-time

## Other responses

- `422`: public_key is not an armored PGP public key block (or is over 8 KB), the name is blank or over 60 characters, agent_name is over 40, or kind is not computer, reader, browser or agent.
- `429`: More than 10 links an hour from this address.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
