---
title: "Make a watch link"
method: POST
path: "/v1/watch-links"
tags: ["Watch links"]
---

# Make a watch link

`POST /v1/watch-links`

## Request

- Base URL: `https://api.uxduck.com`
- URL: `https://api.uxduck.com/v1/watch-links`
- Auth: HTTP bearer

For the owner, at their computer: a link anyone can open to watch it, or one vehicle on it, read only, until it expires (24 hours unless asked, a week at most) or is revoked. The token is in the answer once and never again.

## Request body

- object
  - `deviceId` string, required
  - `flownBy` string, required
  - `hours` integer, nullable
  - `vehicleId` string, nullable
  - `vehicleName` string, nullable

## Response `200`

The link and its token

- object
  - `link` object, required
    - `createdAtMs` integer, required
    - `deviceId` string, required
    - `expiresAtMs` integer, required
    - `flownBy` string, required
    - `id` string, required
    - `vehicleId` string, nullable
    - `vehicleName` string, nullable
  - `token` string, required

## Other responses

- `400`: Not a computer's id, no operator's name, or too long
- `401`: Not signed in
- `404`: Not one of the account's computers
- `503`: Accounts are not set up here

---

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