Skip to content

File links

Share product images and videos through public links that can expire or be revoked.

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.

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

TypeScript SDK responseFileLinkv15.0.0

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

TypeScript SDK requestFileLinkCreateRequestv15.0.0

Defaults and limits

Response

The response returns the new FileLinkCreation and its public url.

Request

POST/file_links/create
cURLbash
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"
}'
TypeScripttypescript
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"),
})
Gogo
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
}
Pythonpython
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")),
))
PHPphp
<?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',
]);
Rubyruby
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"
)
Javajava
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);
  }
}
C#csharp
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",
});
Responsejson
{
  "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

TypeScript SDK responseFileLinkv15.0.0
  • #idstringrequired

    File-link ID to retrieve.

Response

The response returns the requested FileLink.

Request

POST/file_links/lookup
cURLbash
curl https://api.inttegro.com/file_links/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"flink_8pQz3LkY6mN2vT9sB4cD1eF0"}'
TypeScripttypescript
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",
})
Gogo
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
}
Pythonpython
import os

from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.file_links.lookup("flink_8pQz3LkY6mN2vT9sB4cD1eF0")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->fileLinks->lookup("flink_8pQz3LkY6mN2vT9sB4cD1eF0");
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.file_links.lookup(id: "flink_8pQz3LkY6mN2vT9sB4cD1eF0")
Javajava
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");
  }
}
C#csharp
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

TypeScript SDK requestFileLinkPageRequestv15.0.0

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 fileLinks array.

Request

POST/file_links/page
cURLbash
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}'
TypeScripttypescript
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,
})
Gogo
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
}
Pythonpython
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,
))
PHPphp
<?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,
]);
Rubyruby
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
)
Javajava
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);
  }
}
C#csharp
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

TypeScript SDK requestFileLinkRevokeRequestv15.0.0

Response

The response returns the updated FileLink with status set to Inttegro.FileLinkStatuses.Revoked. The URL stops working immediately.

Request

POST/file_links/revoke
cURLbash
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" }
}'
TypeScripttypescript
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",
})
Gogo
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
}
Pythonpython
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")
PHPphp
<?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',
  ],
]);
Rubyruby
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"
)
Javajava
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"));
  }
}
C#csharp
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");

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

TypeScript SDK responseFileLinkv15.0.0
  • #idstringrequired

    File-link ID contained in the returned URL.

  • #tokenstringrequired

    Access 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

GET/file_links/open
cURLbash
curl "<FILE_LINK_URL>" \
  --output hero.png
TypeScripttypescript
import { 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',
})
Gogo
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()
}
Pythonpython
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",
)
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$download = $client->fileLinks->open(
    '<FILE_LINK_URL>',
    './hero.png'
);
Rubyruby
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"
)
Javajava
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"));
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var download = await inttegro.FileLinks.OpenAsync(
    "<FILE_LINK_URL>",
    "./hero.png"
);

Type to search…

↑↓ navigate↵ selectEsc close