Skip to main content
POST
Generate File Description
Generates a one-line description and persists it to description. Uses the filename as the primary signal; if the filename looks generic or is too short (an 8-character-or-shorter stem, or matches patterns like document, scan, untitled, copy, temp), it also downloads the object from S3 and extracts a text preview (PDF via pypdf, plain text verbatim, both capped) to give the model more context. Requires AI to be configured on this deployment. The saved description is the only thing this call caches back to the files row — there’s no stored “extracted text” field otherwise; the S3 read that feeds this happens live, on demand.

Auth

Requires a CRM manage scope and an active organization on the token. Any *:manage scope qualifies — in practice contacts:manage, deals:manage, companies:manage, or activities:manage.

Response

This response does not include the rest of the file row — re-fetch via List Files if you need it.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

file_id
string
required

UUID of the file to generate an AI description for.

Response

Successful Response

The response is of type Response Generate File Description Files File Id Generate Description Post · object.