Push documents from any system into Realm using the REST API. This is useful for syncing data from internal tools, custom databases, or any source without a native data source. Navigate to Settings > Data sources and click Add next to API data source.Documentation Index
Fetch the complete documentation index at: https://docs.withrealm.com/llms.txt
Use this file to discover all available pages before exploring further.
Setting up an API data source
Create the data source
On the Data sources page, click Add next to API data source and give it a name. After creating it, you can upload a custom icon on the data source page. The name and icon appear in search results so users can identify where the content came from.
Create an API key
Go to Settings > API Keys and click Create New Key. Enable the Write documents to Realm permission. Copy the key immediately, as it won’t be shown again. See API Keys for full details.
Push documents
Use the REST API to push documents to your data source. See the Upsert Documents API reference and the examples below.
Pushing documents
Send a POST request to add or update documents. To update a document, send another request with the sameid.
url, meta, createdAt, and readAccess.
Uploading files
For binary files (PDFs, Word documents, etc.), use the two-step upload flow:Listing documents
Retrieve documents from your data source with cursor-based pagination:nextCursor from the response to fetch the next page. See the API Reference for all query parameters.
Deleting documents
Delete all documents older than a given timestamp:Access control
By default, documents are visible to all users in your organization. To restrict access, include areadAccess array with the email addresses of users who should see the document:
Sync behavior
Unlike native data sources, API data sources do not sync automatically. You are responsible for keeping documents up to date. Common approaches:- Cron job that periodically exports data and pushes it to Realm
- Webhook handler that pushes documents when they change in your source system
- CI/CD pipeline that pushes documentation after each deploy

