Files
List Files
List files with optional filtering by status or resource. To list files for a specific chat: GET /v1/files?resourceType=chat&resourceId= To list files for a specific dataset: GET /v1/files?resourceType=dataset&resourceId=
GET
/
v1
/
files
List Files
curl --request GET \
--url https://api.cuadra.ai/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cuadra.ai/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cuadra.ai/v1/files', 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.cuadra.ai/v1/files",
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.cuadra.ai/v1/files"
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.cuadra.ai/v1/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cuadra.ai/v1/files")
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{
"items": [
{
"id": "<string>",
"filename": "<string>",
"contentType": "<string>",
"sizeBytes": 1,
"sha256": "<string>",
"isDuplicate": true,
"storageCharged": 1,
"createdAt": "2023-11-07T05:31:56Z",
"processingStatus": {
"progress": 0,
"error": "Failed to extract text from PDF"
},
"processedAt": "2025-01-17T10:02:30Z",
"associations": [
{
"resourceType": "<string>",
"resourceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"source": "api",
"sourceDetail": "dashboard",
"connectorMetadata": {
"externalId": "<string>",
"externalUrl": "https://docs.google.com/document/d/1Bxi...",
"externalPath": "/Marketing/Q4 Reports/Revenue.pdf",
"modifiedBy": "Jane Doe",
"sourceModifiedAt": "2026-01-10T14:30:00Z",
"labels": [
"important",
"q4-review"
],
"extra": {
"shared": true,
"starred": false
}
}
}
],
"hasMore": true,
"nextCursor": "file_xyz789"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
bearerAuthoauth2
JWT token from Stytch B2B authentication (magic link, SSO, or M2M)
Query Parameters
Filter by resource type: chat, dataset
Filter by resource ID (requires resourceType)
Required range:
1 <= x <= 100Opaque cursor
Response
Paginated list of files
Paginated file list response. Uses cursor-based pagination for scalability.
Was this page helpful?
⌘I
List Files
curl --request GET \
--url https://api.cuadra.ai/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cuadra.ai/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cuadra.ai/v1/files', 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.cuadra.ai/v1/files",
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.cuadra.ai/v1/files"
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.cuadra.ai/v1/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cuadra.ai/v1/files")
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{
"items": [
{
"id": "<string>",
"filename": "<string>",
"contentType": "<string>",
"sizeBytes": 1,
"sha256": "<string>",
"isDuplicate": true,
"storageCharged": 1,
"createdAt": "2023-11-07T05:31:56Z",
"processingStatus": {
"progress": 0,
"error": "Failed to extract text from PDF"
},
"processedAt": "2025-01-17T10:02:30Z",
"associations": [
{
"resourceType": "<string>",
"resourceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"source": "api",
"sourceDetail": "dashboard",
"connectorMetadata": {
"externalId": "<string>",
"externalUrl": "https://docs.google.com/document/d/1Bxi...",
"externalPath": "/Marketing/Q4 Reports/Revenue.pdf",
"modifiedBy": "Jane Doe",
"sourceModifiedAt": "2026-01-10T14:30:00Z",
"labels": [
"important",
"q4-review"
],
"extra": {
"shared": true,
"starred": false
}
}
}
],
"hasMore": true,
"nextCursor": "file_xyz789"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}