---
title: "Publish a camera's live rendition"
method: POST
path: "/v1/media/publish"
tags: ["Media"]
---

# Publish a camera's live rendition

`POST /v1/media/publish`

## Request

- Base URL: `https://api.uxduck.com`
- URL: `https://api.uxduck.com/v1/media/publish`
- Auth: HTTP bearer

For a computer of the account while someone away watches one of its cameras: every media node, nearest first, with a publish grant for an hour that each of them accepts. Ask again before it runs out; a node that fails is left for the next without asking.

## Request body

- object
  - `cameraId` string, required
  - `deviceId` string, required
  - `recordingId` string, nullable
  - `store` boolean, required

## Response `200`

The nodes and the grant

- object
  - `expiresAtMs` integer, required
  - `grant` string, required
  - `nodes` object[], required
    - `id` string, required
    - `region` string, required
    - `srtUrl` string, nullable
    - `whipUrl` string, required
  - `protocol` 'whip' | 'srt', required
  - `streamId` string, required

## Other responses

- `400`: Not a computer's id or a camera's
- `401`: Not signed in
- `404`: Not one of the account's computers
- `503`: Accounts or live video 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)
