Use File links to share product images and videos with customers or other recipients. You can set an expiry or access limit and revoke the link without deleting the underlying file.
Anyone with the URL can use the access it grants. Keep it out of logs and analytics, and share it only with its intended audience.
The file link object
A file link records which file can be opened, how it should be delivered, and when access ends. The public URL is returned only when the link is created.
Properties
FileLinkv13.1.0Go SDK responseFileLinkv14.0.0Java SDK responseFileLinkv11.1.0PHP SDK responseFileLinkv15.0.0Python SDK responseFileLinkv15.0.0Ruby SDK responseFileLinkv13.0.0TypeScript SDK responseFileLinkv15.0.0#
AccessaccessAccessaccessaccessaccessaccessaccessDictionary<string, object?>objectmap[string]anyMap<String, Object>FileLink\AccessFileLinkAccessFileLink::AccessFileLinkAccessAccess limits and usage details for the link.Click or tap to expand- #
AccessCountaccess_countAccessCountaccessCountaccessCountaccess_countaccess_countaccessCountlongintegerint64Long?intint | NoneT.nilable(Integer)numberNumber of successful opens recorded for this link. - #
AllowDownloadallow_downloadAllowDownloadallowDownloadallowDownloadallow_downloadallow_downloadallowDownloadboolbooleanboolBoolean?boolbool | NoneT.nilable(T::Boolean)booleanWhether attachment-style delivery is allowed. - #
AllowedOriginsallowed_originsAllowedOriginsallowedOriginsallowedOriginsallowed_originsallowed_originsallowedOriginsList<object?>array[]anyList<Object>?arraylist[str] | NoneT.nilable(T::Array[String])string[]Optional list of allowed origins. - #
LastAccessedAtlast_accessed_atLastAccessedAtlastAccessedAtlastAccessedAtlast_accessed_atlast_accessed_atlastAccessedAtDateTimeOffsettimestampTimeOffsetDateTime?DateTimeImmutabledatetime | NoneT.nilable(Time)Date | nullWhen the link was last opened successfully. - #
MaxAccessesmax_accessesMaxAccessesmaxAccessesmaxAccessesmax_accessesmax_accessesmaxAccesseslongintegerint64Long?intint | NoneT.nilable(Integer)numberMaximum number of successful opens allowed before the link stops working.
- #
CreatedAtcreated_atCreatedAtcreatedAtcreatedAtcreated_atcreated_atcreatedAtDateTimeOffset?timestampTimeOffsetDateTimeDateTimeImmutabledatetimeTimeDateWhen the link was created.
#
CreatedBycreated_byCreatedBycreatedBycreatedBycreated_bycreated_bycreatedByDictionary<string, object?>objectmap[string]anyMap<String, Object>FileLink\ActorFileLinkActorFileLink::ActorRecord<string, unknown>Actor that created the link.Click or tap to expand#
CustomDatacustom_dataCustomDatacustomDatacustomDatacustom_datacustom_datacustomDataCustomData?object*DataCustomData?CustomDataCustomData | NoneT.nilable(CustomData)CustomDataClick or tap to expandOptional string key-value custom data attached to the link.
#
DeliverydeliveryDeliverydeliverydeliverydeliverydeliverydeliveryDictionary<string, object?>objectmap[string]anyMap<String, Object>FileLink\DeliveryFileLinkDeliveryFileLink::DeliveryFileLinkDeliveryHow the file is presented when someone opens the link.Click or tap to expand- #
ContentTypecontent_typeContentTypecontentTypecontentTypecontent_typecontent_typecontentTypestringstringstringString?stringstr | NoneT.nilable(String)stringOptional content type override for the response. - #
DispositiondispositionDispositiondispositiondispositiondispositiondispositiondispositionstringstringstringString?stringstr | NoneT.nilable(String)stringResponse disposition, such asInttegro.FileDisposition.Attachment"attachment"file.DispositionAttachmentFileDisposition.ATTACHMENT\Inttegro\File\Disposition::Attachmentinttegro.file.Disposition.ATTACHMENTInttegro::File::Disposition::ATTACHMENTInttegro.FileDispositions.AttachmentorInttegro.FileDisposition.Inline"inline"file.DispositionInlineFileDisposition.INLINE\Inttegro\File\Disposition::Inlineinttegro.file.Disposition.INLINEInttegro::File::Disposition::INLINEInttegro.FileDispositions.Inline. - #
ModemodeModemodemodemodemodemodestringstringstringString?stringLiteral['redirect', 'download', 'inline'] | NoneT.nilable(FileLink::DeliveryMode)FileLinkDeliveryModeDelivery mode:Inttegro.FileLinkDeliveryMode.Download"download"filelink.DeliveryModeDownloadFileLinkDeliveryMode.DOWNLOAD\Inttegro\FileLink\DeliveryMode::Downloadinttegro.file_link.DeliveryMode.DOWNLOADInttegro::FileLink::DeliveryMode::DOWNLOADInttegro.FileLinkDeliveryModes.Download,Inttegro.FileLinkDeliveryMode.Inline"inline"filelink.DeliveryModeInlineFileLinkDeliveryMode.INLINE\Inttegro\FileLink\DeliveryMode::Inlineinttegro.file_link.DeliveryMode.INLINEInttegro::FileLink::DeliveryMode::INLINEInttegro.FileLinkDeliveryModes.Inline, orInttegro.FileLinkDeliveryMode.Redirect"redirect"filelink.DeliveryModeRedirectFileLinkDeliveryMode.REDIRECT\Inttegro\FileLink\DeliveryMode::Redirectinttegro.file_link.DeliveryMode.REDIRECTInttegro::FileLink::DeliveryMode::REDIRECTInttegro.FileLinkDeliveryModes.Redirect.
- #
ExpiresAtexpires_atExpiresAtexpiresAtexpiresAtexpires_atexpires_atexpiresAtDateTimeOffset?timestampTimeOffsetDateTimeDateTimeImmutabledatetimeTimeDate | nullWhen the link stops granting access.
- #
KindkindKindkindkindkindkindkindstringstringstringStringstringLiteral['public']FileLink::Kindstring #
MetadatametadataMetadatametadatametadatametadatametadatametadataDictionary<string, object?>objectmap[string]stringMap<String, Object>?arraydict[str, str] | NoneT.nilable(T::Hash[String, String])FileMetadataClick or tap to expandRead-only information added by Inttegro. Use
CustomDatafile_link.custom_dataCustomDatacustomDatacustomDatacustom_datacustom_datacustomDatafor your own values.- #
PurposepurposePurposepurposepurposepurposepurposepurposestringstringstringStringstringstrStringstringPurpose of the linked file. Only product images and videos can be shared with file links:
"product_image""product_image""product_image""product_image"'product_image''product_image''product_image'"product_image"for product images."product_video""product_video""product_video""product_video"'product_video''product_video''product_video'"product_video"for product videos.
- #
RevokedAtrevoked_atRevokedAtrevokedAtrevokedAtrevoked_atrevoked_atrevokedAtDateTimeOffset?timestampTimeOffsetDateTime?DateTimeImmutabledatetime | NoneT.nilable(Time)Date | nullWhen the link was revoked. Returned only after revocation.
#
RevokedByrevoked_byRevokedByrevokedByrevokedByrevoked_byrevoked_byrevokedByDictionary<string, object?>objectmap[string]anyMap<String, Object>?FileLink\ActorFileLinkActor | NoneT.nilable(FileLink::Actor)Record<string, unknown>Actor that revoked the link. Present only after revocation.Click or tap to expand- #
StatusstatusStatusstatusstatusstatusstatusstatusstring?stringStatusFileLinkStatusstringLiteral['active', 'revoked', 'expired', 'disabled']FileLink::StatusFileLinkStatusLink lifecycle status:
Inttegro.FileLinkStatus.Active"active"filelink.StatusActiveFileLinkStatus.ACTIVE\Inttegro\FileLink\Status::Activeinttegro.file_link.Status.ACTIVEInttegro::FileLink::Status::ACTIVEInttegro.FileLinkStatuses.Active,Inttegro.FileLinkStatus.Revoked"revoked"filelink.StatusRevokedFileLinkStatus.REVOKED\Inttegro\FileLink\Status::Revokedinttegro.file_link.Status.REVOKEDInttegro::FileLink::Status::REVOKEDInttegro.FileLinkStatuses.Revoked,Inttegro.FileLinkStatus.Expired"expired"filelink.StatusExpiredFileLinkStatus.EXPIRED\Inttegro\FileLink\Status::Expiredinttegro.file_link.Status.EXPIREDInttegro::FileLink::Status::EXPIREDInttegro.FileLinkStatuses.Expired, orInttegro.FileLinkStatus.Disabled"disabled"filelink.StatusDisabledFileLinkStatus.DISABLED\Inttegro\FileLink\Status::Disabledinttegro.file_link.Status.DISABLEDInttegro::FileLink::Status::DISABLEDInttegro.FileLinkStatuses.Disabled. - #
UpdatedAtupdated_atUpdatedAtupdatedAtupdatedAtupdated_atupdated_atupdatedAtDateTimeOffsettimestampTimeOffsetDateTimeDateTimeImmutabledatetimeTimeDateWhen the link was last updated.
Create a file link POST /file_links/create
Create a public URL for a product image or video. For private files such as support documents and product downloads, use Download file contents from your backend instead.
The response includes the URL to share and a file-link ID for managing it later. Store both when you create the link because lookup responses do not return the URL again.
Request body
CreateParamsv14.0.0Java SDK requestFileLinkCreateParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestCreateRequestv15.0.0Ruby SDK requestFileLink::CreateRequestv13.0.0TypeScript SDK requestFileLinkCreateRequestv15.0.0#
AccessaccessAccessaccess(…)accessaccessaccessaccessDictionary<string, object?>objectAccessFileLinkAccessarray<string, mixed>AccessRequestT.nilable(FileLink::AccessRequest)FileLinkAccessRequestOptional access policy for the link.Click or tap to expand- #
AllowDownloadallow_downloadAllowDownloadallowDownload(…)allowDownloadallow_downloadallow_downloadallowDownloadboolbooleanboolBooleanboolboolT.nilable(T::Boolean)booleanWhether download-style delivery is allowed. - #
AllowedIpRangesallowed_ip_rangesAllowedIPRangesallowedIpRanges(…)allowedIpRangesallowed_ip_rangesallowed_ip_rangesallowedIpRangesList<object?>array[]anyList<String>list<mixed>list[str]T.nilable(T::Array[String])string[]Optional list of allowed CIDR ranges. Enforced when the link is opened but not returned in responses. - #
AllowedOriginsallowed_originsAllowedOriginsallowedOrigins(…)allowedOriginsallowed_originsallowed_originsallowedOriginsList<object?>array[]stringList<String>list<mixed>list[str]T.nilable(T::Array[String])string[]Optional list of allowed origins. - #
MaxAccessesmax_accessesMaxAccessesmaxAccesses(…)maxAccessesmax_accessesmax_accessesmaxAccesseslongintegerint64IntegerintintT.nilable(Integer)numberOptional maximum successful open count.
#
CreatedBycreated_byCreatedBycreatedBy(…)createdBycreated_bycreated_bycreatedByDictionary<string, object?>objectActorActorarray<string, mixed>ActorInputT.nilable(File::ActorInput)FileActorOptional actor creating the link. By default,CreatedBy.Typecreated_by.typeCreatedBy.TypecreatedBy.typecreatedBy.typecreated_by.typecreated_by.typecreatedBy.typeis"api_key""api_key""api_key""api_key"'api_key''api_key''api_key'"api_key".Click or tap to expand#
CustomDatacustom_dataCustomDatacustomData(…)customDatacustom_datacustom_datacustomDataDictionary<string, object?>object*DataCustomDataarray<string, mixed>CustomDataT.nilable(CustomData)CustomDataClick or tap to expandOptional string key-value custom data for your own tracking. The encoded object can be at most 25 KiB, and each key can be at most 256 characters.
#
DeliverydeliveryDeliverydelivery(…)deliverydeliverydeliverydeliveryDictionary<string, object?>objectDeliveryFileLinkDeliveryarray<string, mixed>DeliveryInputT.nilable(FileLink::Delivery)FileLinkDeliveryOptional delivery settings for the link.Click or tap to expand- #
ContentTypecontent_typeContentTypecontentType(…)contentTypecontent_typecontent_typecontentTypestringstringstringStringstringstrT.nilable(String)stringOptional content type override. - #
DispositiondispositionDispositiondisposition(…)dispositiondispositiondispositiondispositionstringstringstringStringstringstrT.nilable(String)stringOptional disposition override. UseInttegro.FileDisposition.Attachment"attachment"file.DispositionAttachmentFileDisposition.ATTACHMENT\Inttegro\File\Disposition::Attachmentinttegro.file.Disposition.ATTACHMENTInttegro::File::Disposition::ATTACHMENTInttegro.FileDispositions.AttachmentorInttegro.FileDisposition.Inline"inline"file.DispositionInlineFileDisposition.INLINE\Inttegro\File\Disposition::Inlineinttegro.file.Disposition.INLINEInttegro::File::Disposition::INLINEInttegro.FileDispositions.Inline. - #
FilenamefilenameFilenamefilename(…)filenamefilenamefilenamefilenamestringstringstringStringstringstrT.nilable(String)stringOptional filename override. - #
ModemodeModemode(…)modemodemodemodestringstringstringFileLinkDeliveryModestringLiteral['redirect', 'download', 'inline', FileLinkDeliveryMode.REDIRECT, FileLinkDeliveryMode.DOWNLOAD, FileLinkDeliveryMode.INLINE]T.nilable(FileLink::DeliveryMode)FileLinkDeliveryModeDelivery mode:Inttegro.FileLinkDeliveryMode.Download"download"filelink.DeliveryModeDownloadFileLinkDeliveryMode.DOWNLOAD\Inttegro\FileLink\DeliveryMode::Downloadinttegro.file_link.DeliveryMode.DOWNLOADInttegro::FileLink::DeliveryMode::DOWNLOADInttegro.FileLinkDeliveryModes.Download,Inttegro.FileLinkDeliveryMode.Inline"inline"filelink.DeliveryModeInlineFileLinkDeliveryMode.INLINE\Inttegro\FileLink\DeliveryMode::Inlineinttegro.file_link.DeliveryMode.INLINEInttegro::FileLink::DeliveryMode::INLINEInttegro.FileLinkDeliveryModes.Inline, orInttegro.FileLinkDeliveryMode.Redirect"redirect"filelink.DeliveryModeRedirectFileLinkDeliveryMode.REDIRECT\Inttegro\FileLink\DeliveryMode::Redirectinttegro.file_link.DeliveryMode.REDIRECTInttegro::FileLink::DeliveryMode::REDIRECTInttegro.FileLinkDeliveryModes.Redirect.
- #
ExpiresAtexpires_atExpiresAtexpiresAt(…)expiresAtexpires_atexpires_atexpiresAtDateTimeOffsettimestamp*TimeTimeDateTimeImmutabledatetimeT.nilable(Time)DateOptional RFC 3339 expiry. The default is 24 hours from creation.
Defaults and limits
- Links expire after 24 hours unless you provide a future
ExpiresAtexpires_atExpiresAtexpiresAtexpires_atexpires_atexpires_atexpiresAt. - Delivery defaults to
Inttegro.FileLinkDeliveryMode.Download"download"filelink.DeliveryModeDownloadFileLinkDeliveryMode.DOWNLOAD\Inttegro\FileLink\DeliveryMode::Downloadinttegro.file_link.DeliveryMode.DOWNLOADInttegro::FileLink::DeliveryMode::DOWNLOADInttegro.FileLinkDeliveryModes.Download. UseInttegro.FileLinkDeliveryMode.Inline"inline"filelink.DeliveryModeInlineFileLinkDeliveryMode.INLINE\Inttegro\FileLink\DeliveryMode::Inlineinttegro.file_link.DeliveryMode.INLINEInttegro::FileLink::DeliveryMode::INLINEInttegro.FileLinkDeliveryModes.Inlineto display supported media in the browser orInttegro.FileLinkDeliveryMode.Redirect"redirect"filelink.DeliveryModeRedirectFileLinkDeliveryMode.REDIRECT\Inttegro\FileLink\DeliveryMode::Redirectinttegro.file_link.DeliveryMode.REDIRECTInttegro::FileLink::DeliveryMode::REDIRECTInttegro.FileLinkDeliveryModes.Redirectto send the browser to a short-lived delivery URL. Access.MaxAccessesaccess.max_accessesAccess.MaxAccessesaccess.maxAccessesaccess.max_accessesaccess.max_accessesaccess.max_accessesaccess.maxAccessessets the number of successful opens. Omit it or use00000000for no access-count limit.- An attachment requires
Access.AllowDownloadaccess.allow_downloadAccess.AllowDownloadaccess.allowDownloadaccess.allow_downloadaccess.allow_downloadaccess.allow_downloadaccess.allowDownloadset totruetruetruetruetrueTruetruetrue. - Allowed origins must contain only a scheme and host. Allowed IP ranges use CIDR notation.
Response
The response returns the new FileLinkCreationobjectFileLinkFileLinkCreationFileLinkCreationCreationCreationFileLinkCreation and its public UrlurlURLurlurlurlurlurl.
Request
curl https://api.inttegro.com/file_links/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_id": "file_4q6YcQk1RzPv2mDa8nFw0sHu",
"delivery": { "mode": "inline" },
"access": { "allow_download": true, "max_accesses": 100 },
"expires_at": "2030-07-06T12:30:00Z"
}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.fileLinks.create({
fileId: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
delivery: {
mode: "inline",
},
access: {
allowDownload: true,
maxAccesses: 100,
},
expiresAt: new Date("2030-07-06T12:30:00Z"),
})package main
import (
"context"
"log"
"os"
"time"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/filelink"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := filelink.CreateParams{
FileID: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
Delivery: filelink.Delivery{
Mode: "inline",
},
Access: filelink.Access{
AllowDownload: true,
MaxAccesses: 100,
},
ExpiresAt: mustParseTime("2030-07-06T12:30:00Z"),
}
fileLink, url, err := client.FileLinks.Create(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = fileLink
_ = url
}
func mustParseTime(value string) *time.Time {
parsed, err := time.Parse(time.RFC3339, value)
if err != nil {
panic(err)
}
return &parsed
}import os
from datetime import datetime
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.file_links.create(inttegro.file_link.CreateRequest(
file_id="file_4q6YcQk1RzPv2mDa8nFw0sHu",
delivery=inttegro.file_link.DeliveryInput(
mode="inline",
),
access=inttegro.file_link.AccessRequest(
allow_download=True,
max_accesses=100,
),
expires_at=datetime.fromisoformat("2030-07-06T12:30:00Z".replace("Z", "+00:00")),
))<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->fileLinks->create([
'file_id' => 'file_4q6YcQk1RzPv2mDa8nFw0sHu',
'delivery' => [
'mode' => 'inline',
],
'access' => [
'allow_download' => true,
'max_accesses' => 100,
],
'expires_at' => '2030-07-06T12:30:00Z',
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.file_links.create(
file_id: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
delivery: {
mode: "inline",
},
access: {
allow_download: true,
max_accesses: 100,
},
expires_at: "2030-07-06T12:30:00Z"
)import com.inttegro.Client;
import com.inttegro.files.FileLinkCreateParams;
import com.inttegro.files.FileLinkDelivery;
import com.inttegro.files.FileLinkDeliveryMode;
import com.inttegro.files.FileLinkAccess;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var expiresAt = new Time();
var params = FileLinkCreateParams.builder()
.fileId("file_4q6YcQk1RzPv2mDa8nFw0sHu")
.delivery(FileLinkDelivery.builder()
.mode(FileLinkDeliveryMode.INLINE)
.build())
.access(FileLinkAccess.builder()
.allowDownload(true)
.maxAccesses(100)
.build())
.expiresAt(expiresAt)
.build();
var result = client.fileLinks().create(params, null);
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.FileLinks.CreateAsync(new {
file_id = "file_4q6YcQk1RzPv2mDa8nFw0sHu",
delivery = new {
mode = "inline",
},
access = new {
allow_download = true,
max_accesses = 100,
},
expires_at = "2030-07-06T12:30:00Z",
});{
"file_link": {
"id": "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
"kind": "public",
"file_id": "file_4q6YcQk1RzPv2mDa8nFw0sHu",
"purpose": "product_image",
"status": "active",
"active": true,
"delivery": {
"mode": "inline",
"filename": "hero.png",
"content_type": "image/png",
"disposition": "inline"
},
"access": { "allow_download": true, "max_accesses": 100, "access_count": 0 },
"created_by": { "type": "api_key" },
"created_at": "2026-06-05T12:30:00Z",
"updated_at": "2026-06-05T12:30:00Z",
"expires_at": "2030-07-06T12:30:00Z"
},
"url": "<FILE_LINK_URL>"
}Lookup a file link POST /file_links/lookup
Retrieve a file link’s status, delivery settings, access limits, and usage. The public URL is returned only when you create the link.
Request body
FileLinkv13.1.0Go SDK responseFileLinkv14.0.0Java SDK responseFileLinkv11.1.0PHP SDK responseFileLinkv15.0.0Python SDK responseFileLinkv15.0.0Ruby SDK responseFileLinkv13.0.0TypeScript SDK responseFileLinkv15.0.0Response
The response returns the requested FileLinkobjectFileLinkFileLinkFileLinkFileLinkFileLinkFileLink.
Request
curl https://api.inttegro.com/file_links/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"flink_8pQz3LkY6mN2vT9sB4cD1eF0"}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.fileLinks.lookup({
id: "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
result, err := client.FileLinks.Lookup(ctx, "flink_8pQz3LkY6mN2vT9sB4cD1eF0")
if err != nil {
log.Fatal(err)
}
_ = result
}import os
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.file_links.lookup("flink_8pQz3LkY6mN2vT9sB4cD1eF0")<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->fileLinks->lookup("flink_8pQz3LkY6mN2vT9sB4cD1eF0");require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.file_links.lookup(id: "flink_8pQz3LkY6mN2vT9sB4cD1eF0")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.fileLinks().lookup("flink_8pQz3LkY6mN2vT9sB4cD1eF0");
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.FileLinks.LookupAsync("flink_8pQz3LkY6mN2vT9sB4cD1eF0");Page file links POST /file_links/page
Browse the file links in your Inttegro account. Filter by file to see every link created for one asset, or by status to find links that are active, revoked, expired, or disabled.
Request body
PageParamsv14.0.0Java SDK requestFileLinkPageParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestPageRequestv15.0.0Ruby SDK requestFileLink::PageRequestv13.0.0TypeScript SDK requestFileLinkPageRequestv15.0.0- #
PageNumberpage_numberPageNumberpageNumber(…)pageNumberpage_numberpage_numberpageNumberlongintegerintIntegerintintT.nilable(Integer)numberPage number to retrieve. Defaults to
11111111. - #
StatusstatusStatusstatus(…)statusstatusstatusstatusstringstringstringFileLinkStatusstringLiteral['active', 'revoked', 'expired', 'disabled', FileLinkStatus.ACTIVE, FileLinkStatus.REVOKED, FileLinkStatus.EXPIRED, FileLinkStatus.DISABLED]T.nilable(FileLink::Status)FileLinkStatusOptional status filter:
Inttegro.FileLinkStatus.Active"active"filelink.StatusActiveFileLinkStatus.ACTIVE\Inttegro\FileLink\Status::Activeinttegro.file_link.Status.ACTIVEInttegro::FileLink::Status::ACTIVEInttegro.FileLinkStatuses.Active,Inttegro.FileLinkStatus.Revoked"revoked"filelink.StatusRevokedFileLinkStatus.REVOKED\Inttegro\FileLink\Status::Revokedinttegro.file_link.Status.REVOKEDInttegro::FileLink::Status::REVOKEDInttegro.FileLinkStatuses.Revoked,Inttegro.FileLinkStatus.Expired"expired"filelink.StatusExpiredFileLinkStatus.EXPIRED\Inttegro\FileLink\Status::Expiredinttegro.file_link.Status.EXPIREDInttegro::FileLink::Status::EXPIREDInttegro.FileLinkStatuses.Expired, orInttegro.FileLinkStatus.Disabled"disabled"filelink.StatusDisabledFileLinkStatus.DISABLED\Inttegro\FileLink\Status::Disabledinttegro.file_link.Status.DISABLEDInttegro::FileLink::Status::DISABLEDInttegro.FileLinkStatuses.Disabled.
Response
Without a status filter, links are returned newest first. A status-filtered page is ordered by expiry. The response contains the current page number, the number of links returned, and a FileLinkspage.file_linksFileLinksfileLinksfileLinksfile_linksfile_linksfileLinks array.
Request
curl https://api.inttegro.com/file_links/page \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id":"file_4q6YcQk1RzPv2mDa8nFw0sHu","status":"active","page_number":1,"page_size":25}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.fileLinks.page({
fileId: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
status: "active",
pageNumber: 1,
pageSize: 25,
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/filelink"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := filelink.PageParams{
FileID: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
Status: "active",
PageNumber: 1,
PageSize: 25,
}
result, err := client.FileLinks.Page(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}import os
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.file_links.page(inttegro.file_link.PageRequest(
file_id="file_4q6YcQk1RzPv2mDa8nFw0sHu",
status="active",
page_number=1,
page_size=25,
))<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->fileLinks->page([
'file_id' => 'file_4q6YcQk1RzPv2mDa8nFw0sHu',
'status' => 'active',
'page_number' => 1,
'page_size' => 25,
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.file_links.page(
file_id: "file_4q6YcQk1RzPv2mDa8nFw0sHu",
status: "active",
page_number: 1,
page_size: 25
)import com.inttegro.Client;
import com.inttegro.files.FileLinkPageParams;
import com.inttegro.files.FileLinkStatus;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = FileLinkPageParams.builder()
.fileId("file_4q6YcQk1RzPv2mDa8nFw0sHu")
.status(FileLinkStatus.ACTIVE)
.pageNumber(1)
.pageSize(25)
.build();
var result = client.fileLinks().page(params);
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.FileLinks.PageAsync(new {
file_id = "file_4q6YcQk1RzPv2mDa8nFw0sHu",
status = "active",
page_number = 1,
page_size = 25,
});Revoke a file link POST /file_links/revoke
Stop a public URL from serving its file. Revoke a link when it was shared with the wrong audience, has outlived its purpose, or should be replaced with a different access policy.
Request body
RevokeParamsv14.0.0Java SDK requestFileLinkRevokeParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestRevokeRequestv15.0.0Ruby SDK requestFileLink::RevokeRequestv13.0.0TypeScript SDK requestFileLinkRevokeRequestv15.0.0#
RevokedByrevoked_byRevokedByrevokedBy(…)revokedByrevoked_byrevoked_byrevokedByDictionary<string, object?>objectActorActorarray<string, mixed>ActorInputT.nilable(File::ActorInput)FileActorOptional actor revoking the link.Click or tap to expand
Response
The response returns the updated FileLinkobjectFileLinkFileLinkFileLinkFileLinkFileLinkFileLink with Statusfile_link.statusStatusstatusstatusstatusstatusstatus set to Inttegro.FileLinkStatus.Revoked"revoked"filelink.StatusRevokedFileLinkStatus.REVOKED\Inttegro\FileLink\Status::Revokedinttegro.file_link.Status.REVOKEDInttegro::FileLink::Status::REVOKEDInttegro.FileLinkStatuses.Revoked. The URL stops working immediately.
Request
curl https://api.inttegro.com/file_links/revoke \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: revoke-file-link-001" \
-H "Content-Type: application/json" \
-d '{
"id": "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
"revoked_by": { "type": "user", "id": "usr_support_123" }
}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.fileLinks.revoke({
id: "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
revokedBy: {
type: "user",
id: "usr_support_123",
},
}, {
idempotencyKey: "revoke-file-link-001",
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/filelink"
"github.com/inttegro/inttegro-sdk-go/v14/request"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := filelink.RevokeParams{
ID: "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
RevokedBy: filelink.Actor{
Type: "user",
ID: "usr_support_123",
},
}
result, err := client.FileLinks.Revoke(ctx, params, request.WithIdempotencyKey("revoke-file-link-001"))
if err != nil {
log.Fatal(err)
}
_ = result
}import os
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.file_links.revoke(inttegro.file_link.RevokeRequest(
id="flink_8pQz3LkY6mN2vT9sB4cD1eF0",
revoked_by=inttegro.file.ActorInput(
type="user",
id="usr_support_123",
),
),
idempotency_key="revoke-file-link-001")<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->fileLinks->revoke([
'id' => 'flink_8pQz3LkY6mN2vT9sB4cD1eF0',
'revoked_by' => [
'type' => 'user',
'id' => 'usr_support_123',
],
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.file_links.revoke(
id: "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
revoked_by: {
type: "user",
id: "usr_support_123",
},
idempotency_key: "revoke-file-link-001"
)import com.inttegro.Client;
import com.inttegro.files.FileLinkRevokeParams;
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 = FileLinkRevokeParams.builder()
.id("flink_8pQz3LkY6mN2vT9sB4cD1eF0")
.revokedBy(Actor.builder()
.type("user")
.id("usr_support_123")
.build())
.build();
var result = client.fileLinks().revoke(params, RequestOptions.withIdempotencyKey("revoke-file-link-001"));
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.FileLinks.RevokeAsync(new {
id = "flink_8pQz3LkY6mN2vT9sB4cD1eF0",
revoked_by = new {
type = "user",
id = "usr_support_123",
},
}, "revoke-file-link-001");Open a file link GET /file_links/open
This is the public endpoint behind the URL returned when you create a file link. It does not use your API key. Applications should use the complete returned URL rather than constructing it from the query parameters.
Query parameters
FileLinkv13.1.0Go SDK responseFileLinkv14.0.0Java SDK responseFileLinkv11.1.0PHP SDK responseFileLinkv15.0.0Python SDK responseFileLinkv15.0.0Ruby SDK responseFileLinkv13.0.0TypeScript SDK responseFileLinkv15.0.0Access token contained in the returned URL.
Response
Use the complete URL returned by Create a file link unchanged. It works only while the link is active and within its expiry and access limits.
Download and inline links return the file. Redirect links send the browser to a short-lived delivery URL. A successful open counts toward access.max_accesses; an unsuccessful attempt does not. This public URL operation deliberately stays in wire form because it is not an SDK resource method.
Request
curl "<FILE_LINK_URL>" \
--output hero.pngimport { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const download = await inttegro.fileLinks.open({
url: '<FILE_LINK_URL>',
saveTo: './hero.png',
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
download, err := client.FileLinks.Open(ctx, "<FILE_LINK_URL>")
if err != nil {
log.Fatal(err)
}
defer download.Close()
}import os
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
download = client.file_links.open(
"<FILE_LINK_URL>",
save_to="./hero.png",
)<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$download = $client->fileLinks->open(
'<FILE_LINK_URL>',
'./hero.png'
);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
download = client.file_links.open(
"<FILE_LINK_URL>",
save_to: "./hero.png"
)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 download = client.fileLinks().open("<FILE_LINK_URL>");
download.saveTo(java.nio.file.Path.of("./hero.png"));
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var download = await inttegro.FileLinks.OpenAsync(
"<FILE_LINK_URL>",
"./hero.png"
);