Folderit v2-compatible API

REST v2Read & write

Integration API for copiers, ERPs and external workflows: folders, files, versions, uploads, sharing, search, folder mail-in and audit, with paths compatible with Folderit v2. It acts for the whole account with the permissions chosen for the key (not as one person), so give keys only to trusted systems.

Base URL: https://cwdrive.com/v2
Keys: Herramientas administrativas → API pública (owners and administrators).
For AI assistants and per-person access, use the agent API (v1) instead: it acts as one member and respects their folder permissions.

Authentication

Send the key as a bearer token. Keys start with cwapi_, are shown once when created, and can expire or be revoked at any time.

Authorization: Bearer cwapi_…
ScopeAllows
browseRead accounts, folders, files, versions, search, downloads
uploadUploads and new versions
editCreate, rename, move and annotate; section order; folder mail-in
deleteMove to the recycle bin
shareCreate, list and revoke shares
auditRead audit logs

Conventions

  • Account path: every path after /accounts starts with /accounts/{accountUid} (shown on the API page); a key only reaches its own account.
  • Pagination: ?page= and ?page-size= (max 500). Responses carry X-Pagination-Total-Count, X-Pagination-Page-Count, X-Pagination-Current-Page, X-Pagination-Per-Page and a Link header (first, prev, self, next, last).
  • X-Folderit-Request-Key: send a unique value with every change; it is recorded in the audit log with the operation so a retry can be traced.
  • Errors: 401 invalid key, 403 missing scope, 404 not found (or another account's item), 409 conflict (for example a file checked out by someone else), 400 invalid request, with a JSON error message.
  • Audit: every change is logged with the key as actor (api:<keyId>).

Account

GET /v2/accounts

Accounts this key belongs to scope: browse

Returns

Array with the key's account.

Example

curl "https://cwdrive.com/v2/accounts" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}

Account details scope: browse

Returns

Account.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/section-order

Order of the top-level sections scope: browse

Returns

Array of section uids.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/section-order" \
  -H "Authorization: Bearer cwapi_…"

PUT /v2/accounts/{accountUid}/section-order

Reorder the top-level sections scope: edit

Body (JSON)

NameTypeDescription
(body) requiredstring[]Section uids in the new order.

Returns

The order saved.

Example

curl -X PUT "https://cwdrive.com/v2/accounts/{accountUid}/section-order" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '["<sectionUid>","<sectionUid>"]'

Entities (folders and files together)

GET /v2/accounts/{accountUid}/entities

Top-level entities scope: browse

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Entities (folders and files).

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/entities" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/entities/all

Every entity, optionally under one folder scope: browse

Query

NameTypeDescription
parentUidstringOnly entities under this folder.
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Entities.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/entities/all" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/entities/{uid}

One entity scope: browse

Returns

Entity.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/entities/{uid}" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/entities/{uid}/entities

Children of a folder scope: browse

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Entities.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/entities/{uid}/entities" \
  -H "Authorization: Bearer cwapi_…"

PUT /v2/accounts/{accountUid}/entities/{uid}

Rename, move or annotate an entity scope: edit

Body (JSON)

NameTypeDescription
namestringNew name.
parentUidstringDestination folder (files require one).
extra.notestringNote (up to 5,000 characters).
extra.date / extra.dueDatestringDocument and due dates (files).

Returns

Updated entity.

Example

curl -X PUT "https://cwdrive.com/v2/accounts/{accountUid}/entities/{uid}" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Nuevo nombre"}'

DELETE /v2/accounts/{accountUid}/entities/{uid}

Move an entity to the recycle bin scope: delete

Returns

The entity, marked deleted (folders with their contents).

Example

curl -X DELETE "https://cwdrive.com/v2/accounts/{accountUid}/entities/{uid}" \
  -H "Authorization: Bearer cwapi_…"

Folders

GET /v2/accounts/{accountUid}/folders

Top-level folders (sections) scope: browse

Returns

Folders.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/folders" \
  -H "Authorization: Bearer cwapi_…"

POST /v2/accounts/{accountUid}/folders

Create a folder scope: edit

Body (JSON)

NameTypeDescription
name requiredstringFolder name.
parentUidstringParent folder; omit for a new section.
returnDuplicateFolderbooleanReturn the existing folder instead of failing when the name is taken.

Returns

Folder.

Example

curl -X POST "https://cwdrive.com/v2/accounts/{accountUid}/folders" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Facturas 2026","parentUid":"<folderUid>"}'

GET /v2/accounts/{accountUid}/folders/{uid}

One folder scope: browse

Returns

Folder, including its mail-in address when active.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}" \
  -H "Authorization: Bearer cwapi_…"

PUT /v2/accounts/{accountUid}/folders/{uid}

Rename, move or reorder a folder scope: edit

Body (JSON)

NameTypeDescription
namestringNew name.
parentUidstringNew parent folder.
extra.notestringNote.
sectionOrderintegerPosition among sections.

Returns

Folder.

Example

curl -X PUT "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Nuevo nombre"}'

DELETE /v2/accounts/{accountUid}/folders/{uid}

Move a folder and its contents to the recycle bin scope: delete

Returns

Folder, marked deleted.

Example

curl -X DELETE "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/folders/{uid}/folders

Subfolders scope: browse

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Folders.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/folders" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/folders/{uid}/files

Files in a folder scope: browse

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Files.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/files" \
  -H "Authorization: Bearer cwapi_…"

POST /v2/accounts/{accountUid}/folders/{uid}/email

Activate, reset or deactivate the folder's mail-in address scope: edit

Body (JSON)

NameTypeDescription
action"activate" | "reset" | "deactivate"Default activate. reset issues a new address.

Returns

{active, address}.

Example

curl -X POST "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/email" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"action":"activate"}'

DELETE /v2/accounts/{accountUid}/folders/{uid}/email

Deactivate the mail-in address scope: edit

Returns

{active:false, address:null}.

Example

curl -X DELETE "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/email" \
  -H "Authorization: Bearer cwapi_…"

Files and versions

GET /v2/accounts/{accountUid}/files/{uid}

One file scope: browse

Returns

File.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}" \
  -H "Authorization: Bearer cwapi_…"

PUT /v2/accounts/{accountUid}/files/{uid}

Rename, move or annotate a file scope: edit

Body (JSON)

NameTypeDescription
namestringNew name.
parentUidstringDestination folder.
extra.note / extra.date / extra.dueDatestringNote and dates.

Returns

File.

Example

curl -X PUT "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Nuevo nombre"}'

DELETE /v2/accounts/{accountUid}/files/{uid}

Move a file to the recycle bin scope: delete

Returns

File, marked deleted.

Example

curl -X DELETE "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/files/{uid}/download

Download the current version scope: browse

Returns

File bytes.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/download" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/files/{uid}/preview

Preview the current version scope: browse

Returns

File bytes (inline).

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/preview" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/files/{uid}/versions

Versions of a file scope: browse

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Versions.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/versions" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/files/{uid}/versions/{versionUid}/download

Download one version scope: browse

Returns

File bytes.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/versions/{versionUid}/download" \
  -H "Authorization: Bearer cwapi_…"

Uploads

POST /v2/accounts/{accountUid}/files/upload

Start, follow, finish or abort an upload scope: upload

Uploads go in parts. 1) action:"create" with fileName, fileSize (up to 20 MB), contentType and folderUid (new file) or fileUid (new version); optional parts {"1":{},"2":{}} returns signed part URLs. 2) PUT each part to its URL. 3) action:"complete" with uploadId, key and fileSize. Also action:"part" (URL for one part), "parts" (parts received) and "abort". Uploads expire after 48 hours.

Body (JSON)

NameTypeDescription
action required"create" | "part" | "parts" | "complete" | "abort"Step.
fileName / fileSize / contentTypestring / integer / stringFor create; fileSize again for complete.
folderUid | fileUidstringDestination folder, or the file to add a version to.
uploadId / keystringFrom create; required for the other actions.
partNumberintegerFor action part (1–10,000).

Returns

create: {uploadId, key, urls?}; complete: the file.

Example

curl -X POST "https://cwdrive.com/v2/accounts/{accountUid}/files/upload" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"action":"create","folderUid":"<folderUid>","fileName":"factura.pdf","fileSize":123456,"contentType":"application/pdf"}'

PUT /v2/uploads/{uploadId}/parts/{partNumber}?key={key}

Send one part scope: upload

Body (JSON)

NameTypeDescription
(body) requiredbytesThe part's raw bytes.

Returns

ETag header.

Example

curl -X PUT "https://cwdrive.com/v2/uploads/{uploadId}/parts/{partNumber}?key={key}" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>"

Sharing

POST /v2/accounts/{accountUid}/folders/{uid}/shares

Share a folder scope: share

Body (JSON)

NameTypeDescription
recipientType"user" | "group" | "link"Default user when email is given, else link.
emailstringUser to share with.
groupUidstringGroup to share with.
role / permissionsstring / string[]Access level or explicit permissions.
expiresAtstringOptional expiry (ISO date-time).

Returns

Share (for links, including the link URL).

Example

curl -X POST "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/shares" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"email":"persona@empresa.com","role":"viewer"}'

POST /v2/accounts/{accountUid}/files/{uid}/shares

Share a file scope: share

Body (JSON)

NameTypeDescription
(same as folders)See the folder share.

Returns

Share.

Example

curl -X POST "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/shares" \
  -H "Authorization: Bearer cwapi_…" \
  -H "X-Folderit-Request-Key: <unique-id>" \
  -H "Content-Type: application/json" \
  -d '{"email":"persona@empresa.com","role":"viewer"}'

GET /v2/accounts/{accountUid}/shares

Every share of the account scope: share

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Shares.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/shares" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/shares/{uid}

One share scope: share

Returns

Share.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/shares/{uid}" \
  -H "Authorization: Bearer cwapi_…"

DELETE /v2/accounts/{accountUid}/shares/{uid}

Revoke a share scope: share

Returns

The revoked share.

Example

curl -X DELETE "https://cwdrive.com/v2/accounts/{accountUid}/shares/{uid}" \
  -H "Authorization: Bearer cwapi_…"

Search and audit

GET /v2/accounts/{accountUid}/search/files

Search files only scope: browse

Query

NameTypeDescription
query requiredstringText to look for.

Returns

Matching files.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/search/files" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/audit

Account audit log scope: audit

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Audit events.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/audit" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/folders/{uid}/audit

Audit log of a folder scope: audit

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Audit events.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/folders/{uid}/audit" \
  -H "Authorization: Bearer cwapi_…"

GET /v2/accounts/{accountUid}/files/{uid}/audit

Audit log of a file scope: audit

Query

NameTypeDescription
pageintegerPage number (default 1).
page-sizeintegerItems per page (default 100, max 500).

Returns

Audit events.

Example

curl "https://cwdrive.com/v2/accounts/{accountUid}/files/{uid}/audit" \
  -H "Authorization: Bearer cwapi_…"

This reference mirrors the server's /v2 routes.