Sync Modes
Each folder can be assigned one of three sync modes:Folder Discovery
Before setting policies, your UI needs to show the user’s folder tree. The folder discovery endpoint returns one level at a time (lazy loading):parent_id:
null policy means the folder inherits its sync mode from its nearest ancestor with a policy, or defaults to sync.
Setting Folder Policies
Create or update a folder policy on a connection:string
required
The folder ID from the source provider (e.g., Google Drive folder ID).
string
Display name of the folder. Updated on each request to stay current.
string
Display path of the folder. Updated on each request to stay current.
string
The parent folder’s provider ID. Used for policy inheritance resolution.
string
required
One of
sync, skip, or manual.Listing policies
Deleting a policy
sync).
Policy Inheritance
Policies resolve hierarchically — the most specific folder wins:- Check the folder itself for a policy
- Walk up the parent chain checking each ancestor
- If no policy is found, default to
sync
/Engineering is set to sync and /Engineering/Drafts is set to skip, files in /Engineering will sync but files in /Engineering/Drafts will not.
Manual Review Workflow
When a folder is set tomanual, new documents from that folder land in pending_review status instead of being indexed immediately. Your app can then present a review UI.
List pending resources
Use the existing/memories/list endpoint with a status filter:
Approve a resource
Approving moves the resource topending status, which queues it for indexing:
Reject a resource
Rejecting moves the resource toskipped status — it will not be indexed:
Webhook Notifications
When folder sync events occur, Hyperspell fires webhook notifications (if you have a webhook URL configured in your app settings):
These use the same webhook payload format and signature verification as other Hyperspell webhooks. See Webhooks for details.