---
title: "File upload requests"
description: "Collect a file from a customer or partner through a secure, time-limited upload link."
canonical: "https://studio.inttegro.com/api/file-uploads"
format: inttegro-machine-docs/v1
language: "Java"
sdk_version: "v8.3.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/java/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 611
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "machine-only-decisions"
recommended_mcp_tools: ["upload_file"]
estimated_tokens: 9480
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Collect a file from a customer or partner through a secure, time-limited upload link. This Java representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. Is File upload requests the right source for this task?

Use this reference for collect a file from a customer or partner through a secure, time-limited upload link. Keep the four decision rules below with its exact operations and fields; do not infer a broader workflow from endpoint order.

#### Q2. What does “Use this API for an external uploader, not for a trusted server upload” require?

**Use this API for an external uploader, not for a trusted server upload.**
Your application creates one time-limited request for one file and shares its
upload link without sharing an API credential. For direct server uploads, use
[Files](https://studio.inttegro.com/machine/java/api/files.md).

#### Q3. What does “Do not stop at successful request creation” require?

**Do not stop at successful request creation.** Read [`uploadRequest(…).active(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)to determine whether the link can still accept a file and wait for a fulfilled
state with a resulting[`uploadRequest(…).fileId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html).

#### Q4. What does “Use attempt details to decide whether the same uploader can continue” require?

**Use attempt details to decide whether the same uploader can continue.** A
failed attempt does not necessarily mean the request itself is terminal;
inspect the attempt error, remaining attempt allowance, request status, and
expiry together.

#### Q5. What does “Continue with the file resource” require?

**Continue with the file resource.** Once fulfilled, use [Lookup a
file](https://studio.inttegro.com/machine/java/api/files.md#lookup-a-file) to verify availability and obtain the delivery
details appropriate to its purpose.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`upload_file`](https://studio.inttegro.com/machine/java/inttegro-mcp/tools.md#upload_file) — action; exact user confirmation required. Uploads canonical base64 file content up to 5 MiB and returns safe file metadata without echoing bytes or unrestricted custom data.

## Document content

# File upload requests

Upload requests let a customer, supplier, or other partner add a file to your Inttegro account through a secure, time-limited link. Your application creates the request and shares the link; the uploader sends the file directly to Inttegro without gaining access to your API credentials.

Use an upload request when someone outside your application needs to provide a product image, downloadable product, catalog import, video, or support document. Each request collects one file and produces a normal Inttegro file when the upload succeeds.

## Follow the upload-request handoff through to a usable file

The four decision rules are in the machine preamble above.

## The upload request object

An upload request records what file you expect, who should provide it, and whether it has arrived. New requests start as [`UploadRequestStatus.PENDING`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#PENDING); an accepted file changes the request to [`UploadRequestStatus.FULFILLED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FULFILLED) and sets [`uploadRequest(…).fileId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html). A request can instead become [`UploadRequestStatus.FAILED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FAILED), [`UploadRequestStatus.EXPIRED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#EXPIRED), or [`UploadRequestStatus.CANCELED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#CANCELED).

Use [`uploadRequest(…).active(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) to decide whether the link can still accept a file. When a request is fulfilled, retrieve the resulting file through [Lookup a file](https://studio.inttegro.com/machine/java/api/files.md#lookup-a-file).

### Properties

- [`active(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `boolean`

  Whether the request can still accept an upload.

- [`attempt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Most recent upload attempt. Lookup and upload responses include it after the uploader has tried to send a file.

  - [`attempt(…).attemptedAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

    When the upload attempt started.

  - [`attempt(…).contentType(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Declared content type when present.

  - [`attempt(…).declaredSize(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Declared file size in bytes when present.

  - [`attempt(…).error(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `object`

    Why the file was not accepted and whether the uploader may try again.

  - [`attempt(…).failedAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

    When a failed attempt completed.

  - [`attempt(…).fileId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Resulting file ID after a successful attempt.

  - [`attempt(…).filename(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Submitted filename when present.

  - [`attempt(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Unique attempt identifier.

  - [`attempt(…).ordinal(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    One-based attempt number for the request.

  - [`attempt(…).review(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `object`

    Your approval or rejection of the uploaded file, when reviewed.

  - [`attempt(…).status(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Attempt status such as `"succeeded"` or `"failed"`.

  - [`attempt(…).succeededAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

    When a successful attempt completed.

  - [`attempt(…).uploadRequestId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Upload-request ID that owns the attempt.

- [`attempts(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Upload-attempt limit and current counts.

  - [`attempts(…).attemptCount(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Total upload attempts recorded for this request.

  - [`attempts(…).failedAttemptCount(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    How many upload attempts have failed validation or fulfillment.

  - [`attempts(…).lastAttemptedAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

    When the most recent upload attempt happened.

  - [`attempts(…).maxAttempts(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Maximum number of allowed failed attempts.

- [`canceledAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When the request was canceled. Returned only after cancellation.

- [`canceledBy(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Person or system that canceled the request. Present only after cancellation.

  - [`canceledBy(…).email(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor email when available.

  - [`canceledBy(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor ID when available.

  - [`canceledBy(…).name(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor display name when available.

  - [`canceledBy(…).service(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Service name when the request was canceled by an automated workflow.

  - [`canceledBy(…).type(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Kind of actor that canceled the request.

- [`constraints(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Optional file requirements that are stricter than the selected purpose.

  - [`constraints(…).contentTypes(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `array`

    Optional narrowed allow-list of MIME types.

  - [`constraints(…).exactSize(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Optional exact file size in bytes.

  - [`constraints(…).extensions(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `array`

    Optional narrowed allow-list of filename extensions.

  - [`constraints(…).filename(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Optional exact filename requirement.

  - [`constraints(…).maxSize(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Optional maximum file size in bytes.

  - [`constraints(…).minSize(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `integer`

    Optional minimum file size in bytes.

- [`createdAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When the upload request was created.

- [`customData(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `object`

  Optional string key-value custom data copied to the resulting file.

- [`display(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Human-facing copy shown to the uploader.

  - [`display(…).description(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Optional longer explanation of what should be uploaded.

  - [`display(…).helpText(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Optional supporting guidance for the uploader.

  - [`display(…).title(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Short title for the upload prompt.

- [`expiredAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When the request was marked expired. Returned only after expiry is recorded.

- [`expiresAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When the public upload URL stops accepting uploads.

- [`fileId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

  Resulting file ID after a successful upload. Omitted until fulfillment succeeds.

- [`fulfilledAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When a valid upload produced the file. Returned only after fulfillment succeeds.

- [`id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

  Unique upload-request identifier. IDs begin with `uplreq_`.

- [`latestError(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Most recent validation or fulfillment error.

  - [`latestError(…).at(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

    When the error was recorded.

  - [`latestError(…).code(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Stable error code for the failure.

  - [`latestError(…).message(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Human-readable error message.

  - [`latestError(…).param(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Request field associated with the error when available.

  - [`latestError(…).retryable(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `boolean`

    Whether the uploader can try again.

- [`metadata(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `object`

  Additional read-only details supplied by Inttegro. Use [`uploadRequest(…).customData(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) for your own data.

- [`purpose(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

  File purpose the upload must satisfy:`"product_download"` accepts PDF, ZIP, text, and CSV files up to 100 MiB.
  `"product_image"` accepts JPEG, PNG, and GIF images up to 10 MiB.
  `"product_video"` accepts MP4, WebM, and QuickTime video up to 250 MiB.
  `"products_import"` accepts a CSV catalog import up to 32 MiB and 10,000 product rows.
  `"support_document"` accepts PDF, JPEG, PNG, and text files up to 25 MiB.

- [`recipient(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Person expected to provide the file, when you want that context on the request.

  - [`recipient(…).email(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Recipient email when available.

  - [`recipient(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Recipient ID when available.

  - [`recipient(…).name(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Recipient display name when available.

  - [`recipient(…).type(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Recipient type such as `"customer"`, `"email"`, or `"user"`.

- [`requester(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Person or system that created the request. Inttegro identifies the caller from the API key unless you supply additional details.

  - [`requester(…).email(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor email when available.

  - [`requester(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor ID when available.

  - [`requester(…).name(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Actor display name when available.

  - [`requester(…).service(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Service name when the request came from an automated workflow.

  - [`requester(…).type(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Kind of actor that created the request.

- [`resource(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Order, product, case, or other resource that needs the file.

  - [`resource(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Resource ID.

  - [`resource(…).name(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Resource name when available.

  - [`resource(…).type(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Resource type.

- [`status(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

  Upload-request lifecycle status: [`UploadRequestStatus.PENDING`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#PENDING), [`UploadRequestStatus.UPLOADING`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#UPLOADING), [`UploadRequestStatus.FULFILLED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FULFILLED), [`UploadRequestStatus.EXPIRED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#EXPIRED), [`UploadRequestStatus.CANCELED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#CANCELED), or [`UploadRequestStatus.FAILED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FAILED).

- [`subject(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html)

  Person or resource that the requested file is about.

  - [`subject(…).email(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Subject email when available.

  - [`subject(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Subject ID when available.

  - [`subject(…).name(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Subject display name when available.

  - [`subject(…).type(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

    Subject type such as `"customer"`, `"case"`, or `"user"`.

- [`updatedAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When the upload request was last updated.

- [`uploadUrl(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `string`

  Secure upload link returned only when you create the request. Share it only with the intended uploader; lookup, page, and cancel responses do not return it again.

- [`uploadingAt(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) — `timestamp`

  When an upload attempt moved into active fulfillment. Returned only while or after an upload attempt has started.

When an attempt has been reviewed, [`uploadRequest(…).attempt(…).review(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) records the decision, the review time, an optional message for the uploader, and any structured reasons.

For `"products_import"`, every nonblank data row must contain at least these columns in order: `name`, `type`, `price_currency`, `price_value`, `reference`, `description`, `about`, `category`, `tax_code`, `unit_dimension`, `price_label`, `publish`, and `attributes`. An optional first header row may use those names in the same order. The file must contain between 1 and 10,000 data rows.

## Create an upload request

Create an upload request when another person or system should send the file directly to Inttegro. The response includes a secure [`uploadRequest(…).uploadUrl(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) that you can place behind a button, send in a message, or hand to another trusted system.

The `purpose(…)` sets the kinds and maximum size of file Inttegro accepts. Use `constraints(…)` only when this particular request should be stricter—for example, to accept only PDF support documents under 10 MiB.

### Request body

- `attempts(…)` — `UploadAttempts`

  Optional limit on failed upload attempts.

  - `attempts(…).maxAttempts(…)` — `Integer`

    Maximum number of allowed failed attempts. Defaults to `3`.

- `constraints(…)` — `UploadConstraints`

  Optional requirements for this upload. These can narrow, but not widen, the selected purpose.

  - `constraints(…).contentTypes(…)` — `List<String>`

    Optional narrowed allow-list of MIME types.

  - `constraints(…).exactSize(…)` — `Integer`

    Optional exact file size in bytes.

  - `constraints(…).extensions(…)` — `List<String>`

    Optional narrowed allow-list of filename extensions.

  - `constraints(…).filename(…)` — `String`

    Optional exact filename requirement.

  - `constraints(…).maxSize(…)` — `Integer`

    Optional maximum file size in bytes.

  - `constraints(…).minSize(…)` — `Integer`

    Optional minimum file size in bytes.

- `customData(…)` — `CustomData`

  Optional string key-value data for your own reconciliation. Inttegro copies it to the resulting file. The object can be at most 25 KiB and each key at most 256 characters.

- `display(…)` — `UploadDisplay`

  Optional uploader-facing copy.

  - `display(…).description(…)` — `String`

    Optional longer description of what to upload.

  - `display(…).helpText(…)` — `String`

    Optional supporting guidance for the uploader.

  - `display(…).title(…)` — `String`

    Short title for the upload prompt.

- `expiresAt(…)` — `OffsetDateTime`

  Optional RFC 3339 expiry. The default is 24 hours from creation.

- `purpose(…)` — `String` — required

  File purpose the upload must satisfy.

- `recipient(…)` — `Actor`

  Optional uploader identity details.

  - `recipient(…).email(…)` — `String`

    Recipient email when available.

  - `recipient(…).id(…)` — `String`

    Recipient ID when available.

  - `recipient(…).name(…)` — `String`

    Recipient display name when available.

  - `recipient(…).type(…)` — `String`

    Recipient type.

- `requester(…)` — `Actor`

  Optional details about the person or system creating the request. Normally, Inttegro identifies the caller from the API key.

  - `requester(…).email(…)` — `String`

    Actor email when available.

  - `requester(…).id(…)` — `String`

    Actor ID when available.

  - `requester(…).name(…)` — `String`

    Actor display name when available.

  - `requester(…).type(…)` — `String`

    Actor type.

- `resource(…)` — `ResourceRef`

  Optional Inttegro resource or workflow that needs the file.

  - `resource(…).id(…)` — `String`

    Resource ID.

  - `resource(…).name(…)` — `String`

    Resource name when available.

  - `resource(…).type(…)` — `String`

    Resource type.

- `subject(…)` — `Actor`

  Optional person or Inttegro object the requested file is about.

  - `subject(…).email(…)` — `String`

    Subject email when available.

  - `subject(…).id(…)` — `String`

    Subject ID when available.

  - `subject(…).name(…)` — `String`

    Subject display name when available.

  - `subject(…).type(…)` — `String`

    Subject type.

### Upload limits

- The link expires after 24 hours unless you provide a future `expiresAt(…)`.
- The uploader gets three failed attempts unless you set `attempts(…).maxAttempts(…)`.
- File sizes are measured in bytes. Any minimum, maximum, or exact size must fit within the selected purpose's limit.
- Content types, extensions, and an exact filename can make a request more restrictive, but they cannot permit a file that the selected purpose rejects.

### Response

Returns the new upload request and its [`uploadRequest(…).uploadUrl(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html). Save the URL when you create the request because Inttegro does not return it again through lookup, page, or cancel.

Treat the URL like a temporary secret: anyone who has the complete URL can upload against the request. Use a stable idempotency key when retrying this call so that a network failure does not create multiple live links for the same upload.

**Request — POST /upload\_requests/create**

```java
import com.inttegro.Client;
import com.inttegro.files.UploadRequestCreateParams;
import com.inttegro.files.UploadConstraints;
import java.util.List;
import com.inttegro.files.UploadDisplay;
import com.inttegro.files.Actor;
import com.inttegro.files.ResourceRef;
import com.inttegro.CustomData;
import java.time.OffsetDateTime;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestCreateParams.builder()
      .purpose("support_document")
      .constraints(UploadConstraints.builder()
          .contentTypes(List.of(
              "application/pdf"
            ))
          .maxSize(10485760)
          .build())
      .display(UploadDisplay.builder()
          .title("Upload dispute evidence")
          .helpText("Attach a PDF under 10 MB.")
          .build())
      .recipient(Actor.builder()
          .type("customer")
          .email("ama@example.com")
          .build())
      .resource(ResourceRef.builder()
          .type("dispute")
          .id("disp_123")
          .build())
      .customData(new CustomData()
          .set("case_id", "CASE-1001"))
      .expiresAt(OffsetDateTime.parse("2030-07-06T12:30:00Z"))
      .build();
    var result = client.uploadRequests().create(params, RequestOptions.withIdempotencyKey("support-doc-upload-001"));
  }
}
```

```json
{
  "upload_request": {
    "id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
    "purpose": "support_document",
    "status": "pending",
    "active": true,
    "upload_url": "<UPLOAD_URL>",
    "constraints": {
      "content_types": ["application/pdf"],
      "max_size": 10485760
    },
    "display": {
      "help_text": "Attach a PDF under 10 MB.",
      "title": "Upload dispute evidence"
    },
    "subject": {},
    "recipient": { "type": "customer", "email": "ama@example.com" },
    "resource": { "type": "dispute", "id": "disp_123" },
    "requester": { "type": "api_key" },
    "attempts": {
      "max_attempts": 3,
      "attempt_count": 0,
      "failed_attempt_count": 0
    },
    "custom_data": { "case_id": "CASE-1001" },
    "created_at": "2026-06-05T12:30:00Z",
    "updated_at": "2026-06-05T12:30:00Z",
    "expires_at": "2030-07-06T12:30:00Z"
  }
}
```

## Fulfill an upload request

Send the file as `multipart/form-data` to the complete upload link returned when the request was created. This call is made by the uploader and does not use your application's API key; the secure values needed to accept the upload are already part of the URL.

Use the URL exactly as returned. Do not extract, log, or reconstruct its query parameters.

### Included in the upload URL

- `id` — `string` — required — wire-only

  Identifies the upload request. It is already present in the generated upload
  link.

- `token` — `string` — required — wire-only

  Authorizes the upload. It is already present in the generated upload link
  and must remain private.

### Request body

- `file(…)` — `String` — required

  File selected by the uploader.

### Response

Returns the fulfilled upload request and a file receipt containing the resulting [`file(…).id(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadFulfillment.html). Your authenticated backend can pass that ID to [Lookup a file](https://studio.inttegro.com/machine/java/api/files.md#lookup-a-file) when it needs the complete file object.

If Inttegro rejects the file, the response includes an error and the failed attempt. Check `error.retryable` before offering another try. A retryable failure leaves the request pending while attempts remain; otherwise, create a new upload request.

Expired, canceled, fulfilled, and exhausted requests no longer accept uploads.

**Request — POST /upload\_requests/upload**

```java
import com.inttegro.Client;
import com.inttegro.files.UploadRequestFulfillParams;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestFulfillParams.builder()
      .uploadUrl("<UPLOAD_URL>")
      .file("./evidence.pdf")
      .build();
    var result = client.uploadRequests().fulfill(params);
  }
}
```

## Lookup an upload request

Retrieve an upload request when you need its current status or the result of the uploader's latest attempt. After fulfillment, [`uploadRequest(…).fileId(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) identifies the file Inttegro created.

### Request body

- `id(…)` — `string` — required

  Upload-request ID to retrieve.

### Response

Returns the upload request and its latest attempt, when one exists. The response does not include [`uploadRequest(…).uploadUrl(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html); retain that URL only for as long as the intended uploader needs it.

**Request — POST /upload\_requests/lookup**

```java
import com.inttegro.Client;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var result = client.uploadRequests().lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0");
  }
}
```

## Review an upload attempt

Approve or reject the latest upload attempt after your application has checked the file itself—for example, after confirming that a document is readable or contains the requested evidence. Approval keeps a successful request fulfilled. Rejection reopens it for a replacement when another attempt is available.

### Request body

- `attempt_id` — `string` — wire-only

  Attempt ID to review. Supply exactly one of `attempt_id`
  or
  `attemptOrdinal(…)`.

- `attemptOrdinal(…)` — `Long`

  One-based attempt number to review. Supply exactly one of
  `attempt_id` or
  `attemptOrdinal(…)`.

- `decision(…)` — `UploadRequestReviewDecision` — required

  Review decision: [`UploadRequestReviewDecision.APPROVED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestReviewDecision.html#APPROVED)
  or [`UploadRequestReviewDecision.REJECTED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestReviewDecision.html#REJECTED).

- `id(…)` — `String` — required

  Upload-request ID that owns the attempt.

- `publicMessage(…)` — `String`

  Optional explanation suitable for showing to the uploader.

- `reasons(…)` — `List<UploadRequestReviewReason>`

  Optional structured reasons for the decision.

  - `reasons(…).code(…)` — `String`

    Required stable reason code.

  - `reasons(…).message(…)` — `String`

    Required customer-safe explanation.

  - `reasons(…).param(…)` — `String`

    Optional field associated with the reason.

Only the latest attempt can be reviewed. You can approve only a successful attempt, and you cannot review a canceled or expired request. Use `publicMessage(…)` and `reasons(…)` for explanations that are safe to show to the uploader.

### Response

Returns the updated upload request with the reviewed attempt. Use an idempotency key when submitting a review so a retry cannot record the decision twice.

**Request — POST /upload\_requests/review**

```java
import com.inttegro.Client;
import com.inttegro.files.ReviewUploadRequestAttemptByOrdinalParams;
import com.inttegro.files.UploadRequestReviewDecision;
import java.util.List;
import com.inttegro.files.UploadRequestReviewReason;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = ReviewUploadRequestAttemptByOrdinalParams.builder()
      .id("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
      .attemptOrdinal(1L)
      .decision(UploadRequestReviewDecision.REJECTED)
      .reasons(List.of(
          UploadRequestReviewReason.builder()
            .code("document_unreadable")
            .message("The document is too blurry to read.")
            .build()
        ))
      .publicMessage("Please upload a clearer copy.")
      .build();
    var result = client.uploadRequests().review(params, RequestOptions.withIdempotencyKey("review-upload-attempt-001"));
  }
}
```

## Page upload requests

List upload requests when you need to find outstanding uploads, recent fulfillments, or requests associated with a particular order, product, case, or other resource.

### Request body

- `pageNumber(…)` — `Integer`

  Page number to retrieve. Defaults to `1`.

- `pageSize(…)` — `Integer`

  Requested number of upload requests per page. Defaults to `25` and is capped at `256`.

- `purpose(…)` — `String`

  Optional purpose filter.

- `resource` — wire-only

  Optional resource filter.

  - `resource.id` — `string` — wire-only

    Resource ID.

  - `resource.name` — `string` — wire-only

    Resource name when available.

  - `resource.type` — `string` — wire-only

    Resource type.

- `status(…)` — `UploadRequestStatus`

  Optional status filter: [`UploadRequestStatus.PENDING`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#PENDING), [`UploadRequestStatus.UPLOADING`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#UPLOADING), [`UploadRequestStatus.FULFILLED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FULFILLED), [`UploadRequestStatus.EXPIRED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#EXPIRED), [`UploadRequestStatus.CANCELED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#CANCELED), or [`UploadRequestStatus.FAILED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#FAILED).

### Response

Returns a page with [`page(…).uploadRequests(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestPage.html), [`page(…).number(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestPage.html), and [`page(…).size(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestPage.html). Page items omit the latest attempt; use [Lookup an upload request](#lookup-an-upload-request) when you need an attempt or its validation error. An empty page has an empty [`page(…).uploadRequests(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestPage.html) collection and [`page(…).size(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestPage.html) set to `0`.

**Request — POST /upload\_requests/page**

```java
import com.inttegro.Client;
import com.inttegro.files.UploadRequestPageParams;
import com.inttegro.files.UploadRequestStatus;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestPageParams.builder()
      .purpose("support_document")
      .status(UploadRequestStatus.PENDING)
      .pageNumber(1)
      .pageSize(25)
      .build();
    var result = client.uploadRequests().page(params);
  }
}
```

## Cancel an upload request

Cancel a request when you no longer need the file or when you have issued a replacement link. Its upload URL stops working immediately.

### Request body

- `canceledBy(…)` — `Actor`

  Optional actor canceling the request.

  - `canceledBy(…).email(…)` — `String`

    Actor email when available.

  - `canceledBy(…).id(…)` — `String`

    Actor ID when available.

  - `canceledBy(…).name(…)` — `String`

    Actor display name when available.

  - `canceledBy(…).type(…)` — `String`

    Actor type.

- `id(…)` — `String` — required

  Upload-request ID to cancel.

### Response

Returns the request with [`uploadRequest(…).status(…)`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequest.html) set to [`UploadRequestStatus.CANCELED`](https://java.inttegro.dev/v8.3.0/com/inttegro/files/UploadRequestStatus.html#CANCELED). Use a stable idempotency key when retrying the cancellation.

**Request — POST /upload\_requests/cancel**

```java
import com.inttegro.Client;
import com.inttegro.files.UploadRequestCancelParams;
import com.inttegro.files.Actor;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestCancelParams.builder()
      .id("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
      .canceledBy(Actor.builder()
          .type("user")
          .id("usr_support_123")
          .build())
      .build();
    var result = client.uploadRequests().cancel(params, RequestOptions.withIdempotencyKey("cancel-upload-request-001"));
  }
}
```
