Fetch Content
Retrieve the original content of an ingested source.
When to use it
- Download original files – PDFs, DOCX, etc. that you uploaded
- Generate temporary share links – presigned URLs for client-side access
- Re-extract content – rebuild downstream caches from the source of truth
- Preview – display original content alongside recall results
Endpoint
- Auth: Bearer token
- Idempotency: Read-only
- Async: No
Example
Request parameters
Modes
url for client-side downloads where you don’t want to proxy bytes through your backend.
Use content when you need to process the file inline.
Response
Behavior notes
content is empty and the data is in content_base64. For markdown, plain text, or extracted text, content is populated directly.expiry_seconds elapses, the URL stops working. Generate a fresh URL for each long-lived integration rather than caching them.Related endpoints
- Find sources first: List data – browse to find a
source_id - Inspect relationships: Graph relations by source ID – see entities extracted from this source
Errors
Common codes:400 INVALID_PARAMETERS, 404 SOURCE_NOT_FOUND, 422 VALIDATION_ERROR. See Error Responses for the full list.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request to fetch source file content.
Unique identifier for the tenant/organization
"tenant_1234"
Source ID of the file to fetch
"<source_id>"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
"sub_tenant_4567"
Fetch mode: 'content' returns file content, 'url' returns presigned URL, 'both' returns both
content, url, both Expiry time in seconds for presigned URL (60-604800, default: 3600)
60 <= x <= 6048001
Response
Successful Response
Response for file fetch request.
Source ID of the fetched file
"<source_id>"
Whether the fetch was successful
true
File content as string (if mode includes 'content')
File content as base64 encoded string (for binary files, if mode includes 'content')
Presigned URL to access the file (if mode includes 'url')
Content type of the file
Size of the file in bytes
Response message
Error message if fetch failed