Create a cloud drive source
Register a Google Drive, OneDrive, Box, Dropbox, or SharePoint folder as a sync source for a knowledge base, using an existing app connection (Automations → Connections). You can provide an optional custom name; when omitted, the remote folder name or ID becomes the initial display name and can be edited later. The sync lists files under folder_id (optionally recursive), indexes them as documents and charges credits per new/changed file. Trigger a sync with POST /knowledge-bases/{id}/drive-sources/{sourceId}/run, or enable auto_sync for periodic re-syncs. Required scope: knowledge:write (keys without scope restrictions have full access).
Authorizations
API key (fam_..., created under Settings → API Keys) or an OAuth 2.0 access token (fam_at_...). Keys can be restricted to scopes such as assistants:read, calls:write, campaigns:write, automations:read, dashboards:read, dashboards:write, leads:write, segments:write, loop:read, loop:write, phone_numbers:write, sip_trunks:write, knowledge:write, voices:read, billing:read, settings:write, platform:read, platform:write; a *:write scope implies the matching *:read. Automation and dashboard endpoints also accept the legacy calls:* scope. Keys without scope restrictions have full access.
Path Parameters
Knowledge base ID.
Body
Cloud drive provider.
googledrive, one_drive, box, dropbox, sharepoint_graph App connection ID — a connection under Automations → Connections whose toolkit matches provider.
Remote folder ID to sync.
Optional custom display name shown for this source. If omitted, folder_name or folder_id is used initially and can be edited later.
1 - 128"Support knowledge"
Optional remote folder name captured from the connected drive. This is provider metadata, not the editable source name.
Document library drive ID. REQUIRED for provider "sharepoint_graph"; optional for "one_drive" (SharePoint/Business drives accessed via the OneDrive toolkit); unused otherwise.
Recurse into subfolders. Default true.
Maximum files per run. Default 50.
1 <= x <= 500Re-sync automatically on a schedule. Default false.
Hours between auto-sync runs. Default 24.
x >= 1Response
The created cloud drive source.