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
| Name | In | Type | Required |
|---|---|---|---|
q | query | string | no |
limit | query | int32 | no |
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
| Field | Type | Required |
|---|---|---|
name | string | yes |
description | string | no |
fileType | string | yes |
contentType | string | no |
folderId | uuid | no |
tags | string[] | no |
content | string | no |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
name | string | no |
description | string | no |
folderId | uuid | no |
clearFolder | boolean | no |
tags | string[] | 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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
newName | string | no |
targetFolderId | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
parentFolderId | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
visibility | string | yes |
orgFolderId | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
userId | int32 | no |
teamId | uuid | no |
isOrgWide | boolean | no |
role | string | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
aceId | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
versionId | query | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
content | string | yes |
changeSummary | string | no |
changeSource | string | no |
baseVersionId | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
versionId | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
versionId | path | uuid | yes |
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
| Name | In | Type | Required |
|---|---|---|---|
id | path | uuid | yes |
taskId | query | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
q | query | string | no |
limit | query | int32 | no |
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
| Field | Type | Required |
|---|---|---|
fileName | string | yes |
contentType | string | yes |
fileSizeBytes | int64 | yes |
folderId | uuid | no |
taskId | uuid | no |
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
| Field | Type | Required |
|---|---|---|
items | InitiateUpload[] | 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
| Name | In | Type | Required |
|---|---|---|---|
orgId | path | uuid | yes |
Page | query | int32 | no |
PageSize | query | int32 | no |
SortBy | query | string | no |
SortDirection | query | string | no |
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
| Name | In | Type | Required |
|---|---|---|---|
taskId | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
fileName | string | no |
contentType | string | no |
sizeBytes | int64 | no |
sourceFileId | uuid | no |
sourceVersionId | uuid | no |
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
| Name | In | Type | Required |
|---|---|---|---|
taskId | path | uuid | yes |
id | path | uuid | yes |
Request body
| Field | Type | Required |
|---|---|---|
versionId | uuid | no |
Responses: 200 · 400