Skip to main content
GET
/
api
/
v1
/
external
/
companies
/
{companyId}
/
files
/
{fileId}
Get File Metadata
curl --request GET \
  --url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/files/{fileId} \
  --header 'Authorization: <api-key>'
{
  "id": "550e8400-e29b-41d4-a716-446655440020",
  "entityType": "company",
  "entityId": null,
  "displayName": "master-agreement.pdf",
  "fileName": "master-agreement.pdf",
  "contentType": "application/pdf",
  "byteSize": 482133,
  "status": "ready",
  "folderId": null,
  "category": null,
  "placementCount": 1,
  "createdAt": "2026-06-10T09:14:30.000Z",
  "createdBy": "550e8400-e29b-41d4-a716-446655440099",
  "updatedAt": "2026-06-10T09:15:00.000Z",
  "uploadedAt": "2026-06-10T09:14:30.000Z",
  "uploadedBy": "550e8400-e29b-41d4-a716-446655440099"
}

Authorizations

Authorization
string
header
required

API key authentication. Send your raw API key as the Authorization header value with NO scheme prefix — Authorization: YOUR-API-KEY. Do NOT prefix it with Bearer or ApiKey, and do not use an X-API-Key header; those are not accepted.

Path Parameters

companyId
string<uuid>
required

Company identifier

fileId
string<uuid>
required

File identifier

Response

File metadata

Full metadata for one file. Unlike the list shape this also represents files whose upload was never finalized: status is pending until finalize flips it to ready, and the version-derived fields (fileName, contentType, byteSize, uploadedAt, uploadedBy) are null while no current version exists.

A file can be placed on more than one entity (see the placements endpoints). The owner fields here (entityType, entityId, folderId, category) reflect the file's PRIMARY placement — the oldest live one; placementCount > 1 flags that others exist.

id
string<uuid>

File identifier

entityType
enum<string>

The file owner's entity type

Available options:
Event,
Exposure,
Quote,
Submission,
Person,
Organization,
Policy,
company
entityId
string<uuid> | null

The owner entity's id (null for company-level files)

displayName
string

The file's display name (renameable)

fileName
string | null

The immutable original filename of the current version

contentType
string | null

MIME type of the current version

byteSize
integer | null

Size of the current version in bytes

status
enum<string>

Upload lifecycle state. pending = upload intent created but not finalized; ready = bytes verified in storage and available for download; quarantined = malware scan verdict outstanding (not yet downloadable); infected = malware detected (downloads permanently refused).

Available options:
pending,
ready,
quarantined,
infected
folderId
string<uuid> | null

The folder the file is placed in (null = the owner's top level)

category
string | null

Optional category label (per placement; the primary placement's)

placementCount
integer

Number of live placements across all owners. Greater than 1 means the file is shared — enumerate them via List File Placements.

createdAt
string<date-time>

When the file record was created (ISO 8601)

createdBy
string | null

Id of the creating user / API key creator

updatedAt
string<date-time>

When the file record was last updated (ISO 8601)

uploadedAt
string<date-time> | null

When the current version was uploaded (ISO 8601)

uploadedBy
string | null

Id of the user / API key creator who uploaded the current version