---
title: "URLs to store a flight's chunks"
method: POST
path: "/v1/ingest/grants"
tags: ["Flights"]
---

# URLs to store a flight's chunks

`POST /v1/ingest/grants`

## Request

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

Create-only URLs for up to 50 chunks, each `<recording>/<seq>-<sha256>.tlog.zst`, good for an hour. Put each chunk's bytes to its URL, then report them to /v1/ingest/complete.

## Request body

- object
  - `deviceId` string, required
  - `chunks` object[], required
    - `name` string, required
    - `size` integer, required
    - `sha256` string, required

## Response `200`

A URL for each chunk

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

## Other responses

- `400`: Not chunks this computer can store
- `401`: Not signed in
- `403`: Refused by the account's plan: `code` is `storage-full` past its quota, `plan` for video on a free plan
- `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)
