# Register one file's ManifestID from its terms

`POST /v1/datasets/upload/register-content-manifest`

Mint a durable ManifestID for ONE already-staged file, with no
publication and no visible ref move.

The git clean filter needs a manifest identity to write into an LFS
pointer at `git add` time, when no commit — and possibly no tree — exists
yet. Unary and polling-free: QDS expands the terms against its own sealed
blob directories, reruns the canonical chunker, and returns the same
receipt shape whole-tree staging mints. Replaying identical terms is
idempotent.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header, or `Authorization: Bearer …`

## Request body

Required: `application/json` `RegisterContentManifestBody`

## Responses

- `200` Successful Response: `application/json` `any`
- `401` Invalid or missing API key: `application/json` `ErrorResponse`
- `422` Validation Error: `application/json` `HTTPValidationError`

## Schemas

```yaml
RegisterContentManifestBody:
  properties:
    repo_id:
      type: string
      format: uuid
    name:
      type: string
    file_format:
      type: string
      default: generic
    terms:
      items:
        $ref: "#/components/schemas/ManifestTermBody"
      type: array
      minItems: 1
    expected_raw_blake3:
      type: string
      pattern: ^[0-9a-f]{64}$
    expected_raw_sha256:
      type: string
      pattern: ^(?:|[0-9a-f]{64})$
      default: ""
  additionalProperties: false
  type: object
  required:
    - repo_id
    - name
    - terms
    - expected_raw_blake3
  title: RegisterContentManifestBody
  description: |-
    One file's terms, registered as a durable ManifestID (git-filter clean).

    Deliberately NOT a publication: `git add` needs a manifest identity to
    write into its LFS pointer long before a commit exists, and paying for a
    whole-tree operation per staged file is what the v4 filter did wrong.
ManifestTermBody:
  properties:
    blob_id:
      type: string
      pattern: ^[0-9a-f]{64}$
    offset_in_blob:
      type: integer
      minimum: 0
    length:
      type: integer
      minimum: 1
  additionalProperties: false
  type: object
  required:
    - blob_id
    - offset_in_blob
    - length
  title: ManifestTermBody
  description: |-
    One contiguous run of chunks inside one blob, named as a byte range.

    The blob seal proves ``offset_in_blob`` is a dense prefix sum of length over
    the directory ordinal, so a range of ordinals is exactly one range of bytes
    and the two spellings carry the same fact.
ErrorResponse:
  properties:
    detail:
      type: string
      description: Error message describing what went wrong
  type: object
  required:
    - detail
  title: ErrorResponse
  description: Standard error response.
HTTPValidationError:
  properties:
    detail:
      items:
        $ref: "#/components/schemas/ValidationError"
      type: array
  type: object
  title: HTTPValidationError
ValidationError:
  properties:
    loc:
      items:
        type:
          - string
          - integer
      type: array
      title: Location
    msg:
      type: string
      title: Message
    type:
      type: string
      title: Error Type
    input: {}
    ctx:
      type: object
      title: Context
  type: object
  required:
    - loc
    - msg
    - type
  title: ValidationError
```
