---
title: "URLs to store a media node's live recording"
method: POST
path: "/v1/media/live/grants"
tags: ["Media"]
---

# URLs to store a media node's live recording

`POST /v1/media/live/grants`

## Request

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

For media nodes, with their token: a create-only URL for each of up to 50 segments the node recorded, good for an hour, or why it is not kept (its stream unknown, or its account not storing). Put each, then report them to /v1/media/live/complete.

## Request body

- object
  - `nodeId` string, required
  - `segments` object[], required
    - `path` string, required
    - `startedAtMs` integer, required
    - `durationMs` integer, required
    - `size` integer, required
    - `sha256` string, required

## Response `200`

A URL or a reason for each segment, in order

- object
  - `grants` object[], required
    - `key` string
    - `url` string
    - `skip` string
  - `expiresAtMs` number, required

## Other responses

- `400`: Not segments a node recorded
- `401`: Not a media node
- `503`: Storage is 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)
