---
title: "Record that a file's upload failed in the browser"
method: POST
path: "/v2/uploads/sessions/{upload_session_id}/fail"
tags: ["v2 - Upload Sessions"]
---

# Record that a file's upload failed in the browser

`POST /v2/uploads/sessions/{upload_session_id}/fail`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/uploads/sessions/{upload_session_id}/fail`
- Auth: HTTP bearer

Session-token authenticated. The browser could not deliver the bytes (the PUT to storage failed after retries). Marks the asset and its media record failed so the session can still finish. A file already marked ready is left alone.

## Path parameters

- `upload_session_id` string, required

## Query parameters

- `token` string, nullable

## Headers

- `x-upload-token` string, nullable

## Request body

- SessionFailAssetDTO: The browser could not deliver a file. Marks it finished (failed).
  - `media_id` string, required: Media ID whose upload failed
  - `reason` string, nullable: What the browser saw (status code, message)

## Response `200`

Successful Response

- UploadSessionStatusResponse: Full session status for agent polling.
  - `upload_session_id` string, required
  - `workspace_id` string, required
  - `status` string, required
  - `expires_at` string, date-time, required
  - `closed_at` string, date-time, nullable
  - `assets` AssetResponse[], required
    - `media_id` string, required
    - `filename` string, required
    - `content_type` string, required
    - `media_type` string, required
    - `size_bytes` integer, required
    - `status` string, required
    - `created_at` string, date-time, required
  - `groupings` GroupingResponse[], required
    - `grouping_id` string, required
    - `video_media_id` string, required
    - `thumbnail_media_id` string, nullable
    - `title` string, nullable
    - `status` string, required
    - `confidence` number, required
    - `notes` string, nullable
  - `clarification` ClarificationResponse, required: Clarification state.
    - `required` boolean, required
    - `message` string, nullable
    - `options` object[], nullable

## Other responses

- `422`: Validation Error

---

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