Upload a file

Send an Idempotency-Key to make retries safe for 24 hours. Reusing the key with the same effective request (keyed on the uploaded content) returns the original 201 response. Reusing it with a different request returns 409.

put/v1/workspaces/{workspace}/files/{key}

Request

  • Base URL: https://api.uploads.sh
  • URL: https://api.uploads.sh/v1/workspaces/{workspace}/files/{key}
  • Auth: HTTP bearer

Query parameters

replaceboolean

Allow replacement. X-Uploads-Replace: 1 is an equivalent header form.

dryRunboolean

Validate and resolve the final key without writing.

Headers

Idempotency-Keystring

A caller-scoped retry key retained for 24 hours. Use 1 to 255 visible ASCII characters.

Response

Dry-run result when dryRun is enabled.

workspacestring required
keystring required
urlstring uri nullable required
embedUrlstring uri nullable required
replacedboolean required
wouldRefuseboolean required
dryRununknown required

Changes

No recorded changes to this operation across all 1 revision of this API.