Prudai Developer API: projects
The operations of this part (Projects).
Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.
| Method | Path | What it does | State |
|---|---|---|---|
GET | /v1/projects | List the LEO projects (dossiers) you can read | Coming soon |
GET | /v1/projects/{project_id} | Get one project (dossier) | Coming soon |
GET | /v1/projects/{project_id}/documents | List the documents of a project | Coming soon |
POST | /v1/projects/{project_id}/documents | Upload one file into a project | Coming soon |
GET | /v1/projects/{project_id}/documents/{document_id} | Get one document with its processing status | Coming soon |
DELETE | /v1/projects/{project_id}/documents/{document_id} | Move a document to the trash (soft delete, restorable) | Coming soon |
GET | /v1/projects/{project_id}/documents/{document_id}/original | Download the original file of a document (raw bytes) | Coming soon |
POST | /v1/projects/{project_id}/documents/{document_id}/purge | Delete a document from the trash for good | Coming soon |
POST | /v1/projects/{project_id}/documents/{document_id}/restore | Restore a document from the trash | Coming soon |
GET | /v1/projects/{project_id}/documents/{document_id}/text | Get the extracted text (or transcript) of a document | Coming soon |
POST | /v1/projects/{project_id}/drafts/import | Import Word into a new editable project concept | Coming soon |
List the LEO projects (dossiers) you can read
GET /v1/projects
Personal tokens only (403 personal_token_required for a service key): a project is user
data and the rights are exactly the token user’s rights in LEO. Lists the projects the user
owns plus the projects whose knowledge base is shared with them, never another user’s ORDO
dossier project and never an IRMA environment project; only products the user’s account
has. role is owner, editor (may add and remove documents) or reader. q is a
case-insensitive substring of the name (the CLI resolves a project name with it, exactly).
Sorted newest first. When the shared projects cannot be fetched, the page holds only owned
projects, completeness.total is null and notIncluded says so.
On by default; the server can switch it off with DEVELOPER_API_PROJECTS_ENABLED=false, and then personal tokens lack
prudai:projects:read (403 insufficient_scope).
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
q
max length 255include_archived
One of:true,falselimit
default:20· min 1 · max 100cursor
max length 200
Responses
| Status | Meaning |
|---|---|
200 | One page of projects. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/projects" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects list[ { "id": "00000000-0000-4000-8000-000000000000", "name": "string", "description": "string", "kind": "dossier", "product": "string", "archived": false, "role": "owner", "created_at": "2026-11-05T09:30:00.000Z", "updated_at": "2026-11-05T09:30:00.000Z" }]Get one project (dossier)
GET /v1/projects/{project_id}
Personal tokens only. An unknown project and a project you may not read both answer
404 project_not_found: no existence leak through status code or envelope in normal
operation. During an outage of the document service (503 service_unavailable) and through
response timing an existing project can be told apart from an unknown id; project ids are
random UUIDs. 403 product_not_entitled when your account does not have the project’s product.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.
Responses
| Status | Meaning |
|---|---|
200 | The project. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Fields in data (200)
idnamedescription
may benullkind
One of:dossier,tableproduct
The product the project belongs to (leo,zia,vera,bever, …).archivedrole
Your role;ownerandeditormay upload and delete documents. One of:owner,editor,readercreated_atupdated_at
curl -s "https://api.prudai.com/v1/projects/<project_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects get{ "id": "00000000-0000-4000-8000-000000000000", "name": "string", "description": "string", "kind": "dossier", "product": "string", "archived": false, "role": "owner", "created_at": "2026-11-05T09:30:00.000Z", "updated_at": "2026-11-05T09:30:00.000Z"}List the documents of a project
GET /v1/projects/{project_id}/documents
Personal tokens only. The documents in the project’s knowledge base, newest first, with their
processing status. Audio memos (kind: audio) and transcripts (kind: transcript, .vtt/.srt)
carry audio and subtitles metadata once processed; uploaded_by is who uploaded the file.
q filters on the filename (case-insensitive substring). Filtering on kind is left to the
client. completeness.total is the total under the filters.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.status
Processing status;completed= searchable and its text is readable. One of:pending,processing,chunking,embedding,indexing,completed,failedq
max length 200limit
default:50· min 1 · max 200cursor
max length 200deleted
truelists the trash (documents moved there withdeleteProjectDocument) instead of the live documents. One of:true,false
Responses
| Status | Meaning |
|---|---|
200 | One page of documents. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/projects/<project_id>/documents" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents list[ { "id": "00000000-0000-4000-8000-000000000000", "project_id": "00000000-0000-4000-8000-000000000000", "filename": "string", "kind": "audio", "content_type": "string", "status": "pending", "size_bytes": 1, "chunk_count": 1, "original_available": false, "uploaded_by": { "name": "string", "email": "string" }, "subtitles": { "format": "string", "duration_seconds": 1, "speakers": [ "string" ] }, "audio": { "language_code": "string", "provider": "string", "duration_seconds": 1 }, "created_at": "2026-11-05T09:30:00.000Z", "updated_at": "2026-11-05T09:30:00.000Z", "deleted_at": "2026-11-05T09:30:00.000Z" }]Upload one file into a project
POST /v1/projects/{project_id}/documents
Personal tokens only; you must be the owner or an editor of the project
(403 project_write_required otherwise, also for an ORDO dossier: upload there).
multipart/form-data with exactly ONE part, the field file; any other field (such as
uploaded_by) is refused with 422. The uploader recorded in uploaded_by is always the
token’s user, never a value from the request. Accepted: the file types of the LEO upload
except archives (no .zip), including audio memos (.m4a, .webm, .mp3, .wav, …) and
transcripts (.vtt, .srt); maximum size as the LEO upload (413 request_too_large).
403 uploads_restricted when your organisation has disabled uploads for the project’s product.
Processing is asynchronous: the answer is the document with status: pending; poll
getProjectDocument (in next) until completed or failed.
Idempotency. Idempotency-Key is required (8 to 255 printable ASCII characters) and
belongs to the project. The same key with the same file (sha256 and size) returns the same
document with 200 (the first answer was 201); with a different file
422 idempotency_key_reused; while the first request still runs
409 idempotency_request_in_progress. A failed upload frees the key. Deleting the document
frees its keys too.
?dryRun=true checks everything (rights, type, size, key) and returns what would be uploaded
(id: null, sha256, would_upload) without storing anything.
Waits for a human (confirm): the first call answers 202 with an approval request (the
uploaded bytes are part of what is approved); repeat the exact call with
x-prudai-approval: apr_… once a human approved it. A caller without the right gets the
error (404/403), never an approval request.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:write - Approval:
confirm, the user confirms exactly this call. - Dry run:
?dryRun=trueshows what would happen and stores nothing. - Idempotency: send
Idempotency-Key; the same key with the same body does not run the action twice.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.Idempotency-Keyrequired
min length 8 · max length 255 · pattern^[\x21-\x7E]+$dryRun
Validate and show the effect without changing anything. One of:true,false
Body
Format: multipart/form-data.
Responses
| Status | Meaning |
|---|---|
200 | Replay of the same Idempotency-Key and file, or a dry run. |
201 | Uploaded; processing started. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
409 | The same Idempotency-Key is still running (idempotency_request_in_progress), the project has no document store yet (project_not_ready, open it once in LEO), or the document service refuses the change right now (document_conflict, retry later). |
413 | File too large (request_too_large). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/projects/<project_id>/documents" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Idempotency-Key: $(uuidgen)"prudai leo projects-documents create{ "id": "00000000-0000-4000-8000-000000000000", "project_id": "00000000-0000-4000-8000-000000000000", "filename": "string", "kind": "audio", "content_type": "string", "status": "pending", "size_bytes": 1, "chunk_count": 1, "original_available": false, "uploaded_by": { "name": "string", "email": "string" }, "subtitles": { "format": "string", "duration_seconds": 1, "speakers": [ "string" ] }, "audio": { "language_code": "string", "provider": "string", "duration_seconds": 1 }, "created_at": "2026-11-05T09:30:00.000Z", "updated_at": "2026-11-05T09:30:00.000Z", "deleted_at": "2026-11-05T09:30:00.000Z"}Get one document with its processing status
GET /v1/projects/{project_id}/documents/{document_id}
Personal tokens only. Metadata and live status of one document of the project. A failed
document says status: failed without the error text (it can quote content).
original_available: false when the original file is no longer stored (the text may still be).
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.
Responses
| Status | Meaning |
|---|---|
200 | The document. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents get{ "id": "00000000-0000-4000-8000-000000000000", "project_id": "00000000-0000-4000-8000-000000000000", "filename": "string", "kind": "audio", "content_type": "string", "status": "pending", "size_bytes": 1, "chunk_count": 1, "original_available": false, "uploaded_by": { "name": "string", "email": "string" }, "subtitles": { "format": "string", "duration_seconds": 1, "speakers": [ "string" ] }, "audio": { "language_code": "string", "provider": "string", "duration_seconds": 1 }, "created_at": "2026-11-05T09:30:00.000Z", "updated_at": "2026-11-05T09:30:00.000Z", "deleted_at": "2026-11-05T09:30:00.000Z"}Move a document to the trash (soft delete, restorable)
DELETE /v1/projects/{project_id}/documents/{document_id}
Personal tokens only; owner or editor of the project. A soft delete: the document goes
to the trash. It disappears from every document list, from search and from LEO chat (its
search fragments are removed), but the record and the original stay, so
restoreProjectDocument brings it back, as long as the original file is still stored
(restorable says so; without a stored original the trash is a one-way door and only
purgeProjectDocument remains). listProjectDocuments?deleted=true shows the
trash. Final removal happens only with purgeProjectDocument (from the trash) or after
the trash retention period. ?dryRun=true shows what would be moved (would_delete,
restorable and irreversible follow original_available) and changes nothing. Waits for a human
(review): the first call answers 202 with an approval request; repeat
the exact call with x-prudai-approval: apr_… once a human approved it. A caller without
the right gets the error (404/403), never an approval request.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:delete - Approval:
review, a second person or role approves. - Dry run:
?dryRun=trueshows what would happen and stores nothing. - Deleting is soft; see Conventions.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.dryRun
Show what would be deleted without changing anything. One of:true,false
Responses
| Status | Meaning |
|---|---|
200 | In the trash ({id, deleted: true, restorable, deleted_at}; restorable is false when the original is no longer stored), or a dry run ({id, would_delete: true, restorable, irreversible, original_available, ...}). |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
409 | The project has no document store yet (project_not_ready), or the document service refuses the change right now (document_conflict, the document is still being processed or its store is being removed; retry later). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X DELETE "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents delete{ "id": "00000000-0000-4000-8000-000000000000", "deleted": true, "restorable": true, "deleted_at": "2026-11-05T09:30:00.000Z"}Download the original file of a document (raw bytes)
GET /v1/projects/{project_id}/documents/{document_id}/original
Personal tokens only. Not the task envelope on success: the body is the file itself,
Content-Type: application/octet-stream, Content-Disposition: attachment with the
filename (filename*=UTF-8''…), X-Content-Type-Options: nosniff, Cache-Control: no-store
and Content-Length when known. Save it to a file; never render it. Errors are the normal
envelope: 404 original_unavailable when the original is no longer stored (purged by the
retention policy or missing; the text may still be readable), 413 request_too_large above
the upload size limit. A transfer that breaks after the first byte ends in a cut connection
(compare Content-Length), never in a file with an error appended.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.
Responses
| Status | Meaning |
|---|---|
200 | The original file. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
413 | The original is larger than the download limit (request_too_large). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Response format: application/octet-stream.
curl -s "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>/original" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents originalDelete a document from the trash for good
POST /v1/projects/{project_id}/documents/{document_id}/purge
Personal tokens only; owner or editor of the project. Irreversible: removes a document
that is already in the trash completely (record, text, search fragments, audio side files,
original). A live document is refused (409 document_not_in_trash): delete it first.
?dryRun=true shows what would disappear (would_purge, irreversible: true) and changes
nothing. Waits for a human (review): the first call answers 202 with an approval request;
repeat the exact call with x-prudai-approval: apr_… once a human approved it (the approver
gives a reason). A caller without the right gets the error (404/403), never an approval request.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:delete - Approval:
review, a second person or role approves. - Dry run:
?dryRun=trueshows what would happen and stores nothing.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.dryRun
Show what would happen without changing anything. One of:true,false
Responses
| Status | Meaning |
|---|---|
200 | Purged ({id, purged: true, restorable: false}), or a dry run ({id, would_purge: true, irreversible: true, ...}). |
202 | Waiting for human approval (ApprovalRequest; once the approval flow exists). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
409 | The document is not in the trash (document_not_in_trash), the document service refuses the change right now (document_conflict), or the project has no document store yet (project_not_ready). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>/purge" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents purgeRestore a document from the trash
POST /v1/projects/{project_id}/documents/{document_id}/restore
Personal tokens only; owner or editor of the project. Takes a document out of the trash; the
document service processes it again from the stored original (status pending until it is
completed). ?dryRun=true shows the document and changes nothing (200). Waits for a human
(confirm): the first call answers 202 with an approval request; repeat the exact call with
x-prudai-approval: apr_… once a human approved it. A caller without the right gets the
error (404/403), never an approval request.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:write - Approval:
confirm, the user confirms exactly this call. - Dry run:
?dryRun=trueshows what would happen and stores nothing.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.dryRun
Show what would happen without changing anything. One of:true,false
Responses
| Status | Meaning |
|---|---|
200 | Restored: the document (status pending, deleted_at: null); processing is queued. Or a dry run (would_restore: true); nothing changed. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
409 | The document is not in the trash (document_not_in_trash), its original is no longer stored (original_unavailable, it stays in the trash), or the project has no document store yet (project_not_ready). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>/restore" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents restoreGet the extracted text (or transcript) of a document
GET /v1/projects/{project_id}/documents/{document_id}/text
Personal tokens only. Plain text as the document service extracted it; for an audio memo
the transcript, for a .vtt/.srt the normalised transcript. completeness counts text
fragments (total and returned) when the document service reports them, and
truncated: true when the text is not complete; otherwise total is null and notIncluded
says so. Before processing has finished the text can be empty.
- State: coming soon, not in production yet.
- Scope:
prudai:projects:read - Approval:
none, no extra step.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.document_idrequired
The document id. Anything that is not a UUID answers404 document_not_found.
Responses
| Status | Meaning |
|---|---|
200 | The text. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | The document service gave an unexpected answer (upstream_error); nothing of its answer is passed on. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Fields in data (200)
document_idfilenameformat
text/plaintextcharacters
min 0
curl -s "https://api.prudai.com/v1/projects/<project_id>/documents/<document_id>/text" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo projects-documents text{ "document_id": "00000000-0000-4000-8000-000000000000", "filename": "string", "format": "text/plain", "text": "string", "characters": 1}Import Word into a new editable project concept
POST /v1/projects/{project_id}/drafts/import
Imports one .docx upload or one accessible document from a project or knowledge base into
a new document concept. Headings, lists, tables and emphasis are preserved. Footnotes become
endnotes. tracked_changes selects accept or mark; omitted elements are counted in warnings.
The source and destination are checked before a human approval request is created.
The exact multipart bytes are bound to the normal approval grant. Repeat the same request
with x-prudai-approval after approval. Maximum upload 15 MiB. ?dryRun=true returns parsed structure statistics and warnings without creating a concept.
Idempotency-Key is required for creation; retries with the same caller, key and inputs return the same concept for 24 hours.
Creation is reversible through the existing concept deletion route; the source remains unchanged.
- State: coming soon, not in production yet.
- Scope:
prudai:word_import:write - Approval:
confirm, the user confirms exactly this call. - Dry run:
?dryRun=trueshows what would happen and stores nothing. - Idempotency: send
Idempotency-Key; the same key with the same body does not run the action twice.
Parameters
project_idrequired
The LEO project (dossier) id. Anything that is not a UUID answers404 project_not_found.dryRun
One of:true,falseIdempotency-Key
Required when creating a concept; optional for dryRun. max length 255
Body
JSON, required.
document_idrequiredknowledge_base_idtitle
max length 200conversation_idtracked_changes
One of:accept,markdoc_type
One of:brief,memo,advies,overeenkomst,processtuk,email,overig
Responses
| Status | Meaning |
|---|---|
200 | Parsed read-only preview, or the same concept returned for an idempotent retry. |
201 | A new editable concept plus import warnings, counts and retained structure. |
202 | Waiting for human approval; no concept has been created. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
409 | An import with this Idempotency-Key is already running. |
413 | File exceeds the import size limit. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/projects/<project_id>/drafts/import" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "document_id": "00000000-0000-4000-8000-000000000000", "knowledge_base_id": "00000000-0000-4000-8000-000000000000", "title": "string", "conversation_id": "00000000-0000-4000-8000-000000000000", "tracked_changes": "accept", "doc_type": "brief" }'prudai leo projects-drafts import