Endpoints

Files

Files endpoints of the Elnora REST API.

Base URL https://platform.elnora.ai/api/v1. Authenticate every request with the X-API-Key header — see Authentication.

GET /attachments/search

Search the org's rendered agent exports (task attachments) by name for the @-mention picker.

curl https://platform.elnora.ai/api/v1/attachments/search \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
qquerystringno
limitqueryint32no

Responses: 200

POST /files

Create a file (markdown/document).

curl -X POST https://platform.elnora.ai/api/v1/files \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "fileType": "..." }'

Request body

FieldTypeRequired
namestringyes
descriptionstringno
fileTypestringyes
contentTypestringno
folderIduuidno
tagsstring[]no
contentstringno

Responses: 201 · 400

GET /files/{id}

Get file detail with version info.

curl https://platform.elnora.ai/api/v1/files/{id} \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 400

PUT /files/{id}

Update file metadata.

curl -X PUT https://platform.elnora.ai/api/v1/files/{id} \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
namestringno
descriptionstringno
folderIduuidno
clearFolderbooleanno
tagsstring[]no

Responses: 200 · 400

DELETE /files/{id}

Soft-delete a file.

curl -X DELETE https://platform.elnora.ai/api/v1/files/{id} \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 204 · 403 · 404

GET /files/{id}/access

"Who has access" (KB Sharing v3): the full EFFECTIVE access list for a file — every principal who can reach it, each labelled direct (granted on the file) or inherited (from its folder).

curl https://platform.elnora.ai/api/v1/files/{id}/access \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 403 · 404

POST /files/{id}/commit

Commit working copy changes to the original published file.

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/commit \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 201 · 400

GET /files/{id}/content

Get file content (presigned download URL).

curl https://platform.elnora.ai/api/v1/files/{id}/content \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 400

GET /files/{id}/download

Stream file download through the backend.

curl https://platform.elnora.ai/api/v1/files/{id}/download \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 400

POST /files/{id}/fork

Fork a file to another project.

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/fork \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
newNamestringno
targetFolderIduuidno

Responses: 201 · 400

PATCH /files/{id}/move

Move a file to a new workspace-model parent folder.

curl -X PATCH https://platform.elnora.ai/api/v1/files/{id}/move \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "parentFolderId": "00000000-0000-0000-0000-000000000000" }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
parentFolderIduuidyes

Responses: 200 · 400 · 403 · 404

POST /files/{id}/promote

Promote file visibility.

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/promote \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "visibility": "..." }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
visibilitystringyes
orgFolderIduuidno

Responses: 200 · 400

POST /files/{id}/share

Share a file with a specific user, a team, or the whole org (default role: editor).

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/share \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "role": "..." }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
userIdint32no
teamIduuidno
isOrgWidebooleanno
rolestringyes

Responses: 201 · 400 · 403 · 404

DELETE /files/{id}/share/{aceId}

Revoke a file share by ace id.

curl -X DELETE https://platform.elnora.ai/api/v1/files/{id}/share/{aceId} \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes
aceIdpathuuidyes

Responses: 204 · 403 · 404

GET /files/{id}/shares

List the current shares on a file (with resolved principal name/email).

curl https://platform.elnora.ai/api/v1/files/{id}/shares \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 403 · 404

POST /files/{id}/upload/confirm

Confirm upload completed.

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/upload/confirm \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json"

Parameters

NameInTypeRequired
idpathuuidyes
versionIdqueryuuidno

Responses: 200 · 400

GET /files/{id}/versions

List version history.

curl https://platform.elnora.ai/api/v1/files/{id}/versions \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes

Responses: 200 · 400

POST /files/{id}/versions

Create a new version (manual edit).

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/versions \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "..." }'

Parameters

NameInTypeRequired
idpathuuidyes

Request body

FieldTypeRequired
contentstringyes
changeSummarystringno
changeSourcestringno
baseVersionIduuidno

Responses: 201 · 400

GET /files/{id}/versions/{versionId}/content

Get specific version content (presigned download URL).

curl https://platform.elnora.ai/api/v1/files/{id}/versions/{versionId}/content \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
idpathuuidyes
versionIdpathuuidyes

Responses: 200 · 400

POST /files/{id}/versions/{versionId}/restore

Restore a previous version (creates new version with old content).

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/versions/{versionId}/restore \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json"

Parameters

NameInTypeRequired
idpathuuidyes
versionIdpathuuidyes

Responses: 201 · 400

POST /files/{id}/working-copy

Create a working copy of a published file for editing within a task.

curl -X POST https://platform.elnora.ai/api/v1/files/{id}/working-copy \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json"

Parameters

NameInTypeRequired
idpathuuidyes
taskIdqueryuuidno

Responses: 201 · 400

GET /files/search

Search the org's files by name (KB + task inputs/results) for the @-mention picker.

curl https://platform.elnora.ai/api/v1/files/search \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
qquerystringno
limitqueryint32no

Responses: 200

POST /files/upload

Initiate a file upload (get presigned URL).

curl -X POST https://platform.elnora.ai/api/v1/files/upload \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fileName": "...", "contentType": "...", "fileSizeBytes": "..." }'

Request body

FieldTypeRequired
fileNamestringyes
contentTypestringyes
fileSizeBytesint64yes
folderIduuidno
taskIduuidno

Responses: 200 · 400

POST /files/upload/batch

Batch initiate uploads for multiple files (max 50).

curl -X POST https://platform.elnora.ai/api/v1/files/upload/batch \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "items": [] }'

Request body

FieldTypeRequired
itemsInitiateUpload[]yes

Responses: 400

GET /organizations/{orgId}/files

List ALL files across projects (org admin compliance view).

curl https://platform.elnora.ai/api/v1/organizations/{orgId}/files \
  -H "X-API-Key: $ELNORA_API_KEY"

Parameters

NameInTypeRequired
orgIdpathuuidyes
Pagequeryint32no
PageSizequeryint32no
SortByquerystringno
SortDirectionquerystringno

Responses: 200

POST /tasks/{taskId}/files/rendered

User-initiated rendered file write (e.g.

curl -X POST https://platform.elnora.ai/api/v1/tasks/{taskId}/files/rendered \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Parameters

NameInTypeRequired
taskIdpathuuidyes

Request body

FieldTypeRequired
fileNamestringno
contentTypestringno
sizeBytesint64no
sourceFileIduuidno
sourceVersionIduuidno

Responses: 201 · 400

POST /tasks/{taskId}/files/rendered/{id}/confirm

Confirm a user-initiated rendered file version after the presigned PUT completed.

curl -X POST https://platform.elnora.ai/api/v1/tasks/{taskId}/files/rendered/{id}/confirm \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Parameters

NameInTypeRequired
taskIdpathuuidyes
idpathuuidyes

Request body

FieldTypeRequired
versionIduuidno

Responses: 200 · 400

On this page