Skip to main content
POST
/
documents
/
{data_source_id}
/
upload
Upload a file
curl --request POST \
  --url https://{subdomain}.withrealm.com/api/external/alpha/documents/{data_source_id}/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "meta": {},
  "mimeType": "<string>"
}
'
{
  "uploadUrl": "<string>",
  "sourceId": "<string>"
}

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.

These endpoints require a custom API data source. See Custom API for setup instructions. This endpoint returns an uploadUrl. Upload your file content using a PUT request to that URL. The file will be processed in the background and indexed into your knowledge base.
curl -X PUT --data-binary @yourfile.pdf "$UPLOAD_URL"
For detailed documentation on the upload step, see the Google Cloud Storage resumable uploads documentation.

Rate Limits

600 requests per minute.

Authorizations

Authorization
string
header
required

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

Path Parameters

data_source_id
string
required

Body

application/json
title
string
required
meta
object
mimeType
string

Response

Success

uploadUrl
string
required
sourceId
string
required