files

Link an external file (SharePoint, Google Drive, etc.) and return a file upload record

Changed on

This endpoint creates a file upload record that references an external file, allowing it to be used in chat messages or attached to assistants. If chat_id is provided, the file is associated with that chat. If not provided, the file is created as a standalone upload.

post/api/v1beta/me/files/link

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body

LinkFileRequest required

Request to link an external file (SharePoint, Google Drive, etc.)

chat_id, string nullable

Optional chat ID to associate the file with. If not provided, creates standalone files.

provider_metadata, SharepointProviderMetadata required

Provider-specific metadata (e.g., drive_id, item_id for SharePoint)

source, string required

The source/provider type: "sharepoint" (future: "google_drive", etc.)

Response

FileUploadResponse required

Response for file upload

files, FileUploadItem[] required

The list of uploaded files with their IDs and filenames

rejected_files, string[]

Filenames skipped by the configured operation policy.

Changes