---
title: "Refresh an upload URL"
method: POST
path: "/api/v1/uploads/{id}/url"
tags: ["Uploads"]
---

# Refresh an upload URL

`POST /api/v1/uploads/{id}/url`

## Request

- Base URL: `https://app.probbai.com`
- URL: `https://app.probbai.com/api/v1/uploads/{id}/url`
- Auth: HTTP bearer

Get a fresh storage URL when the ten-minute upload URL has expired. Keep the same prepared report instead of creating a duplicate.

## Before you call

Use the reportId returned by preparation. The preparation must still exist and analysis must not have been admitted. This operation has no JSON body.

**Required scope:** `analyses:write`.

## What happens next

PUT the original file to the new URL, then quote and submit the analysis. Refreshing does not extend the preparation beyond its 24-hour lifetime.

## Recovery

A missing or expired preparation requires a new preparation. A 409 means the resource is already admitted; read report status instead of uploading again.

[Follow the complete workflow](/integration-api/) · [Errors and retries](/api-errors/)

## Path parameters

- `id` string, required

## Response `200`

PUT the original file to the new URL, then quote and submit the analysis. Refreshing does not extend the preparation beyond its 24-hour lifetime.

- object
  - `data` Upload, required
    - `reportId` string, required: Report ID returned by upload preparation, admission, discovery, or an event. It must belong to the API key's workspace.
    - `upload` object, nullable, required: Temporary upload instructions; null after admission or when no eligible upload destination can be returned.
      - `url` string, uri, required: Short-lived signed storage URL. Treat it as a credential; never send your ProBB AI API key to it.
      - `method` 'PUT', required: HTTP method required for the signed file upload: PUT.
      - `mimeType` string, required: File content type. The file extension, declared type, and uploaded content must agree.
      - `sizeBytes` number, required: Expected upload size in bytes; send the matching file bytes to the signed URL.
      - `expiresInSeconds` 600, required: Upload URL lifetime in seconds from issuance; refresh before reuse after expiry.

## Other responses

- `400`: Invalid input or cursor
- `401`: Invalid, expired, or revoked API key
- `403`: Disabled organisation or missing scope
- `404`: The resource is absent, expired, deleted, or unavailable in this workspace. Verify the resource ID and key's workspace.
- `405`: Method not allowed; consult Allow for supported methods
- `409`: A missing or expired preparation requires a new preparation. A 409 means the resource is already admitted; read report status instead of uploading again.
- `429`: Request limit exceeded
- `500`: Unexpected failure
- `503`: Service unavailable

---

[API](https://skmtc.dev/probbai/apis/probb-ai-customer-api.md) · [All operations](https://skmtc.dev/probbai/apis/probb-ai-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/probbai/apis/probb-ai-customer-api/revisions/33a3294530e4?raw)
