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.
Operations
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 pending; an accepted file changes the request to fulfilled and sets file_id. A request can instead become failed, expired, or canceled.
Use active to decide whether the link can still accept a file. When a request is fulfilled, retrieve the resulting file through Lookup a file.
Properties
attemptobjectMost recent upload attempt. Lookup and upload responses include it after the uploader has tried to send a file.Click or tap to expandView error detailsClick or tap to expand
Why the file was not accepted and whether the uploader may try again.View review detailsClick or tap to expand
Your approval or rejection of the uploaded file, when reviewed.
- Name
purpose- Type
- string
- Description
File purpose the upload must satisfy:
product_downloadaccepts PDF, ZIP, text, and CSV files up to 100 MiB.product_imageaccepts JPEG, PNG, and GIF images up to 10 MiB.product_videoaccepts MP4, WebM, and QuickTime video up to 250 MiB.products_importaccepts a CSV catalog import up to 32 MiB and 10,000 product rows.support_documentaccepts PDF, JPEG, PNG, and text files up to 25 MiB.
When an attempt has been reviewed, attempt.review 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 upload_url 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
Upload limits
- The link expires after 24 hours unless you provide a future
expires_at. - The uploader gets three failed attempts unless you set
attempts.max_attempts. - 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 upload_url. 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
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/upload_requests/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: support-doc-upload-001" \
-H "Content-Type: application/json" \
-d '{
"purpose": "support_document",
"constraints": {
"content_types": ["application/pdf"],
"max_size": 10485760
},
"display": {
"title": "Upload dispute evidence",
"help_text": "Attach a PDF under 10 MB."
},
"recipient": { "type": "customer", "email": "[email protected]" },
"resource": { "type": "dispute", "id": "disp_123" },
"custom_data": { "case_id": "CASE-1001" },
"expires_at": "2030-07-06T12:30:00Z"
}'
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.create({
purpose: "support_document",
constraints: {
contentTypes: [
"application/pdf",
],
maxSize: 10485760,
},
display: {
title: "Upload dispute evidence",
helpText: "Attach a PDF under 10 MB.",
},
recipient: {
type: "customer",
},
resource: {
type: "dispute",
id: "disp_123",
},
customData: {
case_id: "CASE-1001",
},
expiresAt: "2030-07-06T12:30:00Z",
}, {
idempotencyKey: "support-doc-upload-001",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.UploadRequestCreateParams{
Purpose: "support_document",
Constraints: inttegro.UploadRequestConstraints{
ContentTypes: []string{
"application/pdf",
},
MaxSize: 10485760,
},
Display: inttegro.UploadRequestDisplay{
Title: "Upload dispute evidence",
HelpText: "Attach a PDF under 10 MB.",
},
Recipient: inttegro.FileParty{
Type: "customer",
},
Resource: inttegro.FileResource{
Type: "dispute",
ID: "disp_123",
},
CustomData: map[string]string{
"case_id": "CASE-1001",
},
ExpiresAt: "2030-07-06T12:30:00Z",
}
result, err := client.UploadRequests.Create(ctx, params, inttegro.WithIdempotencyKey("support-doc-upload-001"))
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.create(inttegro.upload_requests.CreateRequest(
purpose="support_document",
constraints=inttegro.upload_requests.Constraints(
content_types=[
"application/pdf",
],
max_size=10485760,
),
display=inttegro.upload_requests.Display(
title="Upload dispute evidence",
help_text="Attach a PDF under 10 MB.",
),
recipient=inttegro.FilePartyInput(
type="customer",
),
resource=inttegro.FileResourceInput(
type="dispute",
id="disp_123",
),
custom_data={
"case_id": "CASE-1001",
},
expires_at="2030-07-06T12:30:00Z",
),
idempotency_key="support-doc-upload-001")
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->create([
'purpose' => 'support_document',
'constraints' => [
'content_types' => [
'application/pdf',
],
'max_size' => 10485760,
],
'display' => [
'title' => 'Upload dispute evidence',
'help_text' => 'Attach a PDF under 10 MB.',
],
'recipient' => [
'type' => 'customer',
],
'resource' => [
'type' => 'dispute',
'id' => 'disp_123',
],
'custom_data' => [
'case_id' => 'CASE-1001',
],
'expires_at' => '2030-07-06T12:30:00Z',
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.create(
purpose: "support_document",
constraints: {
content_types: [
"application/pdf",
],
max_size: 10485760,
},
display: {
title: "Upload dispute evidence",
help_text: "Attach a PDF under 10 MB.",
},
recipient: {
type: "customer",
},
resource: {
type: "dispute",
id: "disp_123",
},
custom_data: {
case_id: "CASE-1001",
},
expires_at: "2030-07-06T12:30:00Z",
idempotency_key: "support-doc-upload-001"
)
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 java.util.Map;
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")
.build())
.resource(ResourceRef.builder()
.type("dispute")
.id("disp_123")
.build())
.customData(Map.<String, String>ofEntries(
Map.entry("case_id", "CASE-1001")
))
.expiresAt("2030-07-06T12:30:00Z")
.build();
var result = client.uploadRequests().create(params, RequestOptions.withIdempotencyKey("support-doc-upload-001"));
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.CreateAsync(new {
purpose = "support_document",
constraints = new {
content_types = new[] {
"application/pdf",
},
max_size = 10485760,
},
display = new {
title = "Upload dispute evidence",
help_text = "Attach a PDF under 10 MB.",
},
recipient = new {
type = "customer",
},
resource = new {
type = "dispute",
id = "disp_123",
},
custom_data = new {
case_id = "CASE-1001",
},
expires_at = "2030-07-06T12:30:00Z",
}, "support-doc-upload-001");
Response
- Object
- JSON
UploadRequestResponse {
uploadRequest: { … },
}
{
"upload_request": {
"id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
"purpose": "support_document",
"status": "pending",
"active": true,
"upload_url": "<UPLOAD_URL>",
"constraints": { … },
"display": { … },
"subject": {},
"resource": { "type": "dispute", "id": "disp_123" },
"requester": { "type": "api_key" },
"attempts": { … },
"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_url 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
Request body
Response
Returns the fulfilled upload request and a file receipt containing the resulting file.id. Your authenticated backend can pass that ID to 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
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl "<UPLOAD_URL>" \
-F "file=@./evidence.pdf;type=application/pdf"
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.fulfill({
uploadUrl: '<UPLOAD_URL>',
file: './evidence.pdf',
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
uploadRequest, file, err := client.UploadRequests.Fulfill(ctx, inttegro.UploadRequestFulfillParams{
UploadURL: "<UPLOAD_URL>",
File: "./evidence.pdf",
})
if err != nil {
log.Fatal(err)
}
_ = uploadRequest
_ = file
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.fulfill(
upload_url="<UPLOAD_URL>",
file="./evidence.pdf",
)
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->fulfill([
'upload_url' => '<UPLOAD_URL>',
'file' => './evidence.pdf',
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.fulfill(
upload_url: "<UPLOAD_URL>",
file: "./evidence.pdf"
)
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);
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.FulfillAsync(new {
upload_url = "<UPLOAD_URL>",
file = "./evidence.pdf",
});
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, file_id identifies the file Inttegro created.
Request body
Response
Returns the upload request and its latest attempt, when one exists. The response does not include upload_url; retain that URL only for as long as the intended uploader needs it.
Request
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/upload_requests/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"uplreq_1gK9pQ4vL8mN2sT5wX7yZ0"}'
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.lookup({
id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
result, err := client.UploadRequests.Lookup(ctx, "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0");
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.lookup(id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
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");
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.LookupAsync("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
Only the latest attempt can be reviewed. You can approve only a successful attempt, and you cannot review a canceled or expired request. Use public_message 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
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/upload_requests/review \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: review-upload-attempt-001" \
-H "Content-Type: application/json" \
-d '{
"id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
"attempt_ordinal": 1,
"decision": "rejected",
"reasons": [{
"code": "document_unreadable",
"message": "The document is too blurry to read."
}],
"public_message": "Please upload a clearer copy."
}'
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.review({
id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
attemptOrdinal: 1,
decision: Inttegro.UploadReviewDecisions.Rejected,
reasons: [
{
code: "document_unreadable",
message: "The document is too blurry to read.",
},
],
publicMessage: "Please upload a clearer copy.",
}, {
idempotencyKey: "review-upload-attempt-001",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.UploadRequestReviewParams{
ID: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
AttemptOrdinal: 1,
Decision: string(inttegro.UploadReviewDecisionRejected),
Reasons: []inttegro.UploadRequestReviewReason{
{
Code: "document_unreadable",
Message: "The document is too blurry to read.",
},
},
PublicMessage: "Please upload a clearer copy.",
}
result, err := client.UploadRequests.Review(ctx, params, inttegro.WithIdempotencyKey("review-upload-attempt-001"))
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.review(inttegro.upload_requests.ReviewByOrdinalRequest(
id="uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
attempt_ordinal=1,
decision=inttegro.UploadReviewDecision.REJECTED,
reasons=[
inttegro.upload_requests.ReviewReason(
code="document_unreadable",
message="The document is too blurry to read.",
),
],
public_message="Please upload a clearer copy.",
),
idempotency_key="review-upload-attempt-001")
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->review([
'id' => 'uplreq_1gK9pQ4vL8mN2sT5wX7yZ0',
'attempt_ordinal' => 1,
'decision' => \Inttegro\UploadReviewDecision::Rejected,
'reasons' => [
[
'code' => 'document_unreadable',
'message' => 'The document is too blurry to read.',
],
],
'public_message' => 'Please upload a clearer copy.',
], [
'idempotency_key' => "review-upload-attempt-001",
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.review(
id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
attempt_ordinal: 1,
decision: Inttegro::UploadReviewDecision::REJECTED,
reasons: [
{
code: "document_unreadable",
message: "The document is too blurry to read.",
},
],
public_message: "Please upload a clearer copy.",
idempotency_key: "review-upload-attempt-001"
)
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"));
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.ReviewAsync(new Inttegro.ReviewUploadRequestAttemptByOrdinalRequest {
Id = "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
AttemptOrdinal = 1,
Decision = "rejected",
Reasons = new List<Inttegro.UploadRequestReviewReason> {
new Inttegro.UploadRequestReviewReason {
Code = "document_unreadable",
Message = "The document is too blurry to read.",
},
},
PublicMessage = "Please upload a clearer copy.",
}, "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
Response
Returns a page with upload_requests, number, and size. Page items omit the latest attempt; use Lookup an upload request when you need an attempt or its validation error. An empty page has upload_requests: [] and size: 0.
Request
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/upload_requests/page \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"purpose":"support_document","status":"pending","page_number":1,"page_size":25}'
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.page({
purpose: "support_document",
status: "pending",
pageNumber: 1,
pageSize: 25,
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.UploadRequestPageParams{
Purpose: "support_document",
Status: "pending",
PageNumber: 1,
PageSize: 25,
}
result, err := client.UploadRequests.Page(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.page(inttegro.upload_requests.PageRequest(
purpose="support_document",
status="pending",
page_number=1,
page_size=25,
))
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->page([
'purpose' => 'support_document',
'status' => 'pending',
'page_number' => 1,
'page_size' => 25,
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.page(
purpose: "support_document",
status: "pending",
page_number: 1,
page_size: 25
)
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);
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.PageAsync(new {
purpose = "support_document",
status = "pending",
page_number = 1,
page_size = 25,
});
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
Response
Returns the request with status set to canceled. Use a stable idempotency key when retrying the cancellation.
Request
- cURL
- TypeScript
- Go
- Python
- PHP
- Ruby
- Java
- C#
curl https://api.inttegro.com/upload_requests/cancel \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: cancel-upload-request-001" \
-H "Content-Type: application/json" \
-d '{
"id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
"canceled_by": { "type": "user", "id": "usr_support_123" }
}'
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.uploadRequests.cancel({
id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
canceledBy: {
type: "user",
id: "usr_support_123",
},
}, {
idempotencyKey: "cancel-upload-request-001",
})
package main
import (
"context"
"log"
"os"
inttegro "github.com/zebodotdev/inttegro-sdk-go/v4"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := inttegro.UploadRequestCancelParams{
ID: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
CanceledBy: inttegro.FileActor{
Type: "user",
ID: "usr_support_123",
},
}
result, err := client.UploadRequests.Cancel(ctx, params, inttegro.WithIdempotencyKey("cancel-upload-request-001"))
if err != nil {
log.Fatal(err)
}
_ = result
}
import os
import inttegro
client = inttegro.InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.upload_requests.cancel(inttegro.upload_requests.CancelRequest(
id="uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
canceled_by=inttegro.FileActorInput(
type="user",
id="usr_support_123",
),
),
idempotency_key="cancel-upload-request-001")
<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->cancel([
'id' => 'uplreq_1gK9pQ4vL8mN2sT5wX7yZ0',
'canceled_by' => [
'type' => 'user',
'id' => 'usr_support_123',
],
]);
require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.cancel(
id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
canceled_by: {
type: "user",
id: "usr_support_123",
},
idempotency_key: "cancel-upload-request-001"
)
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"));
}
}
using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.CancelAsync(new {
id = "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
canceled_by = new {
type = "user",
id = "usr_support_123",
},
}, "cancel-upload-request-001");