Skip to main content
GET
/
v1
/
assets
/
{assetTypeName}
/
{assetId}
/
files
/
{fileId}
Get an Asset File
curl --request GET \
  --url https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Account-ID: <api-key>'
import requests

url = "https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}"

headers = {
    "Authorization": "Bearer <token>",
    "X-Account-ID": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'X-Account-ID': '<api-key>'}
};

fetch('https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "X-Account-ID: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("X-Account-ID", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}")
  .header("Authorization", "Bearer <token>")
  .header("X-Account-ID", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.us.lexful.app/v1/assets/{assetTypeName}/{assetId}/files/{fileId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Account-ID"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "original_name": "<string>",
  "file_extension": "<string>",
  "mime_type": "<string>",
  "size": 123,
  "is_public": true,
  "s3_key": "<string>",
  "entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "property_name": "<string>",
  "indexable": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "updated_by": "<string>",
  "data": {},
  "s3_meta": {
    "etag": "<string>",
    "content_length": 123,
    "content_type": "<string>",
    "content_encoding": "<string>",
    "content_disposition": "<string>",
    "last_modified": "<string>"
  }
}
{
  "status": 123,
  "message": "<string>",
  "error_id": "<string>",
  "error_code": "<string>",
  "developer_message": "<string>"
}
{
  "status": 123,
  "message": "<string>",
  "error_id": "<string>",
  "error_code": "<string>",
  "developer_message": "<string>"
}
{
  "status": 123,
  "message": "<string>",
  "error_id": "<string>",
  "error_code": "<string>",
  "developer_message": "<string>"
}
{
  "status": 123,
  "message": "<string>",
  "error_id": "<string>",
  "error_code": "<string>",
  "developer_message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token

X-Account-ID
string
header
required

Account ID

Path Parameters

assetTypeName
string
required

Asset type name

assetId
string<uuid>
required

Asset ID

fileId
string<uuid>
required

File ID

Query Parameters

include_deleted
boolean

Include soft-deleted (default: false)

expand
string

Comma-separated list of fields to expand (e.g., "s3_meta")

Response

Default Response

id
string<uuid>
required

File unique identifier

organization_id
string<uuid>
required

Organization ID

name
string
required

File name

original_name
string
required

Original filename

file_extension
string
required

File extension (e.g., .pdf, .jpg)

mime_type
string
required

MIME type

size
number
required

File size in bytes

is_public
boolean
required

Whether file is publicly accessible

s3_key
string
required

S3 storage key

upload_status
enum<string>
required

Upload status

Available options:
pending,
uploading,
completed,
failed
entity_id
string<uuid> | null

Associated entity ID

asset_id
string<uuid> | null

Alias for entity_id — same value, preferred for asset-oriented consumers

property_name
string | null

Associated property name

indexable
boolean

Whether this file should be indexed in the knowledge graph

created_at
string<date-time>
updated_at
string<date-time>
created_by
string

User ID who created

updated_by
string

User ID who last updated

data
object

Additional metadata

s3_meta
object

S3 object metadata. Only included when expand=s3_meta is requested.