Skip to main content
POST
/
documents
/
{connector_id}
/
upload
Upload a file
curl --request POST \
  --url https://{subdomain}.withrealm.com/api/external/alpha/documents/{connector_id}/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "meta": {},
  "mimeType": "<string>"
}
'
{
  "uploadUrl": "<string>",
  "sourceId": "<string>"
}
These endpoints require a custom API connector. 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.

Body

application/json
title
string
required
meta
object
mimeType
string

Response

Success

uploadUrl
string
required
sourceId
string
required