curl --request GET \
--url https://api.sandbox.lead.bank/v2/files/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/files/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/files/{id}', 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.sandbox.lead.bank/v2/files/{id}",
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>"
],
]);
$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.sandbox.lead.bank/v2/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.lead.bank/v2/files/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "file_7RwQ2mK9pL4xT1vN8jS5",
"uploaded_by": "partner",
"file_name": "loan_agreement_acct_4471.pdf",
"type": "loan_agreement",
"content_type": "application/pdf",
"size_bytes": 184233,
"checksum": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"created_at": "2026-09-14T14:22:01Z",
"updated_at": "2026-09-14T14:22:01Z",
"metadata": {}
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "internal_server_error",
"message": "Internal server error. Retry with exponential backoff. For a POST, PATCH or DELETE, reuse the same Idempotency-Key so the request isn't processed twice. If it keeps failing, contact Lead with the Lead-Request-ID."
}Retrieve a File
Retrieve a File’s metadata by its ID. No bytes or download URL are returned.
curl --request GET \
--url https://api.sandbox.lead.bank/v2/files/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/files/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/files/{id}', 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.sandbox.lead.bank/v2/files/{id}",
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>"
],
]);
$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.sandbox.lead.bank/v2/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.lead.bank/v2/files/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "file_7RwQ2mK9pL4xT1vN8jS5",
"uploaded_by": "partner",
"file_name": "loan_agreement_acct_4471.pdf",
"type": "loan_agreement",
"content_type": "application/pdf",
"size_bytes": 184233,
"checksum": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"created_at": "2026-09-14T14:22:01Z",
"updated_at": "2026-09-14T14:22:01Z",
"metadata": {}
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "internal_server_error",
"message": "Internal server error. Retry with exponential backoff. For a POST, PATCH or DELETE, reuse the same Idempotency-Key so the request isn't processed twice. If it keeps failing, contact Lead with the Lead-Request-ID."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Lead-issued file id returned by POST /v2/files.
Lead-issued identifier of the file, from POST /v2/files.
^file_\w+$"file_7RwQ2mK9pL4xT1vN8jS5"
Response
The file's metadata.
Unique ID of the file. Use this to link the file to Entity, Application and User Account objects.
"file_7RwQ2mK9pL4xT1vN8jS5"
Who created the file. Set by Lead, not declarable on upload.
partner: created by you through the files API.lead: reserved for files Lead itself creates.
partner, lead "partner"
The filename you declared, taken from the uploaded part's filename
header.
255"loan_agreement_acct_4471.pdf"
The file's type. It decides which objects the file can link to. See the type enum for every value, grouped by the object it links to.
"loan_agreement"
MIME type of the file (e.g., application/pdf), taken from the Content-Type header of the multipart file part.
"application/pdf"
Size of the file in bytes.
184233
A SHA-256 checksum digest of the file bytes, computed by Lead as the file is received.
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
The ISO-8601 timestamp at which the file was created.
"2026-09-14T14:22:01Z"
The ISO-8601 timestamp at which the file was last updated.
"2026-09-14T14:22:01Z"
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
{}
Was this page helpful?

