Skip to content

Schemas

The objects the API sends and takes, as the OpenAPI document defines them.

Who has an item checked out (or open for editing), and since when.

FieldTypeDescription
byPersonRequired. The person holding it.
sincestring (date-time)Required. When they took it (RFC 3339, UTC).

A file to copy, and where the copy goes.

FieldTypeDescription
pathstringRequired. The path of the file to copy (files only).
to_sharestring (uuid)Required. The id of the share the copy goes in: this share or another of the person’s.
to_pathstringRequired. The copy’s full path in that share, its name last. The folder it goes in must exist.
on_conflictstring, one of fail, renameWhat to do when something is already called that: “fail” (the default) answers 409 conflict; “rename” gives the copy the first free name (“Q3 copy.xlsx”). Nothing is ever replaced.

Used by: copyItem.

A folder to create.

FieldTypeDescription
pathstringRequired. The new folder’s full path in the share, its name last: “/Reports/2027”. The folder it goes in must exist. The leading ”/” is optional.
on_conflictstring, one of fail, renameWhat to do when something is already called that: “fail” (the default) answers 409 conflict; “rename” creates it under the first free name in Foldr’s style (“2027 copy”). Nothing is ever replaced.

Used by: createFolder.

What a delete did: the item as it was, and where its storage keeps it now, so your app can tell its user whether and how it can be brought back.

FieldTypeDescription
deletedItemRequired. The item that was deleted, as it was (its path names nothing now).
itemsintegerRequired. How many files and folders went: 1 for a file; a folder and everything in it.
recoverablestring, one of bin, snapshot, noneRequired. “bin”: the storage keeps it in a recycle bin, a trash or its earlier versions, so it can be brought back there; “snapshot”: only the server’s shadow copies hold it, as of the last one; “none”: as far as Foldr can tell it is gone for good.
destinationstring or nullRequired. Where it is, as a stable name: microsoft-365-recycle-bin, google-drive-trash, box-trash, dropbox-deleted-files, foldr-deleted-files, bucket-versions, azure-soft-delete, shadow-copies, shadow-copies-if-enabled, or unknown (Foldr cannot tell whether this storage keeps deleted items). Null where it is certainly gone.
wherestring or nullRequired. The same, in words for a person (“the Microsoft 365 recycle bin”). Bins belong to the share’s storage account, not the person: getting something back is usually for whoever manages it.

Used by: deleteItem.

A short-lived URL that downloads a file straight from its storage, for clients that cannot follow a redirect to another host.

FieldTypeDescription
urlstring (uri)Required. The URL. It carries its own authorisation: send it no Foldr token, and do not log or share it.
expires_atstring (date-time)Required. The URL works until at least this time (RFC 3339, UTC); some storage keeps it working longer.

Used by: getDownloadUrl.

What a native Google document (Docs, Sheets, Slides, Drawings) is downloaded as. It has no bytes of its own: content exports it, as this type, named with this extension.

FieldTypeDescription
mime_typestringRequired. The media type content delivers (for a Google Doc, application/vnd.openxmlformats-officedocument.wordprocessingml.document).
extensionstringRequired. The extension the download is named with, without the dot (docx for a Google Doc). The item’s name and path stay as stored.

A custom field: a named piece of information people record on files.

FieldTypeDescription
idstring (uuid)Required. The field’s id. Always a uuid.
namestringRequired. The field’s name.
typestringRequired. What kind of value it holds. New values may appear. Known values: string, text, number, bool, date, location, select, signature, delegate. Clients must accept values not listed here.
optionsarray or nullRequired. The values it may take, where it has a fixed list (on at least one of the person’s shares); otherwise null.
multiplebooleanRequired. Whether a file can carry more than one value of it.
read_onlybooleanRequired. True when the person may not set it on any of their shares.

Used by: listFields.

One value of a custom field on one item. A field that holds several values appears once per value.

FieldTypeDescription
field_idstring (uuid)Required. The field’s id (see GET /fields).
valueanyRequired. The value: a string, number or boolean by the field’s type; a location is an object.
updated_atstring or null (date-time)Required. When it was last set (RFC 3339, UTC).
updated_byPerson or nullRequired. Who last set it, where known.

Used by: getFieldValues, setFieldValue.

A file or folder in a share. Identified by its share id and canonical path; there is no separate item id.

FieldTypeDescription
share_idstring (uuid)Required. The id of the share the item is in.
pathstringRequired. The canonical path: as the storage holds it (its case), Unicode NFC, always starting with ”/”. ”/” is the top of the share. Send this form back in later calls.
namestringRequired. The item’s name (the last segment of its path; the share’s name for the top).
kindstring, one of file, folderRequired. file or folder.
sizeinteger or nullRequired. Size in bytes; null for a folder, and null when the item has no fixed byte size (a native Google document, exported on download: see export).
modifiedstring or null (date-time)Required. Last modified (RFC 3339, UTC), where the storage reports it.
mime_typestring or nullRequired. The item’s own media type, as the storage reports it or guessed from the name; null for a folder. A native Google document has Google’s own type here (application/vnd.google-apps.document for a Doc); export says what it downloads as.
exportExport or nullRequired. For a native Google document that can be downloaded, what content delivers: its media type and the extension the download is named with. Null for everything else, including a native Google type that cannot be downloaded (a Form: content answers 409 not-downloadable).
etagstring or nullRequired. The item’s entity tag: the storage’s own where it has one, else a weak tag over size and modified time (over modified time alone for a native Google document, whose export is made afresh each time). Null on a search hit, which comes from the index; GET …/item for the live one.
read_onlybooleanRequired. True when the person cannot change things in this share.
checked_outCheckout or nullRequired. Who has the item checked out, or null. Null on a search hit.

Used by: overwriteFile, copyItem, uploadFile, createFolder, getItem, moveItem, renameItem, restoreVersion, completeUploadSession.

One page of a collection. Pass next_cursor back as ?cursor= for the next page; null on the last. Cursors are opaque: never build or change one.

FieldTypeDescription
itemsarray of ItemRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Used by: listChildren.

The person the token acts as. The same body as GET /api/me.

FieldTypeDescription
namestringRequired. Display name, or the username where there is none.
emailstring or nullRequired. Email address, where the directory has one.
usernamestringRequired. Sign-in name.

Used by: getMe.

A file or folder to move, and where it goes: in the same share, or in another of the person’s shares (to_share).

FieldTypeDescription
pathstringRequired. The path of the file or folder to move.
to_pathstringRequired. Its full new path, its name last (the same name, or a new one), in the same share or in to_share. The folder it goes in must exist.
to_sharestring or null (uuid)The id of the share it goes to, when that is another share; absent (or this share’s id) moves it within this share.
on_conflictstring, one of fail, renameWhat to do when something is already called that: “fail” (the default) answers 409 conflict; “rename” gives it the first free name (“Q3 copy.xlsx”). Nothing is ever replaced.

Used by: moveItem.

One of the person’s shares that a search did not cover, and why.

FieldTypeDescription
share_idstring (uuid)Required. The share’s id.
namestringRequired. The share’s name.
reasonstringRequired. unreachable: its file server is down just now; not-indexed: the share is not indexed for search; index-unavailable: its search index did not answer. New values may appear. Known values: unreachable, not-indexed, index-unavailable. Clients must accept values not listed here.

Work Foldr carries on after answering: a copy (copyItem) or a move to another share (moveItem) of a folder, or of a file too big or too slow for one request; and, for an app whose administrator requires approval for its changes, a delete, move or version restore held for an approver (state pending_approval), made once someone approves it. Poll it at its Location (getOperation) until the answer is no longer 202. Kept for 7 days after it finishes.

FieldTypeDescription
idstring (uuid)Required. The operation’s id.
kindstringRequired. What it does: copy, move (to another share, or held for approval within one), delete or restore (a version restore). delete and restore are only ever operations held for approval. Known values: copy, move, delete, restore. Clients must accept values not listed here.
statestring, one of pending_approval, queued, running, cancelling, succeeded, failed, cancelled, declined, expiredRequired. Where it has got to. pending_approval: held for an approver, nothing changed yet (approval says until when); queued: waiting to start; running: under way; cancelling: asked to stop, stopping at its next item; succeeded: done, result is what was made; failed: ended with the problem getOperation answers; cancelled: stopped, and what it had made removed (or, held for approval, withdrawn, nothing changed); declined: an approver said no, nothing changed; expired: nobody approved it in time, nothing changed.
phasestring or nullRequired. A move’s phase: copying (every item is copied first; nothing has been removed from where it was, and a cancel removes the partial copy), then deleting (the copy is whole and proven, and the originals are being removed: too late to cancel). Null for a copy. Known values: copying, deleting. Clients must accept values not listed here.
created_atstring (date-time)Required. When it was asked for (RFC 3339, UTC).
started_atstring or null (date-time)Required. When a worker first started it; null while queued.
finished_atstring or null (date-time)Required. When it finished; null until then.
sourceOperationSourceRequired. What is being copied, moved, deleted or restored.
targetOperationTarget or nullRequired. Where it was asked to go: the path asked for. result.path is where it landed (on_conflict “rename” may have given it another name). Null for a delete or a restore.
version_idstring or nullRequired. For a restore: the version asked for (one of listVersions’ ids). Null otherwise.
progressOperationProgressRequired. How far it has got.
resultItem or nullRequired. Once it has succeeded, what it made (the copy, the moved item at its new place, the restored file), at its canonical path; null until then, and for a delete (see deletion). A move that ended source-remains also has it: the whole copy it made.
deletionDeletion or nullRequired. A delete held for approval, once it has succeeded: what was deleted and where its storage keeps it now, as deleteItem answers. Null otherwise.
approvalOperationApproval or nullRequired. For an operation held for an approver: how its approval stands. Null for one that never waited for approval.
failuresarray of OperationFailureRequired. At most 100 items (failures_truncated says when there were more): for a copy that ended copy-incomplete, those it could not copy; for a move that ended source-remains, those still at the source. Empty otherwise.
failures_truncatedbooleanRequired. True when more items failed than failures lists.

Used by: getOperation, copyItem, deleteItem, moveItem, restoreVersion.

An operation held for an approver: the app’s administrator requires approval for its deletes, moves and version restores. Who approves, and where, is the organisation’s own business: nothing here names them.

FieldTypeDescription
statusstringRequired. pending: waiting for an approver; approved: someone approved it (the operation then made the change, or says why it could not); declined: an approver said no; expired: nobody decided it in time; withdrawn: the person (or your app, by cancelling the operation) took it back; closed: it could no longer be decided as asked. Known values: pending, approved, declined, expired, withdrawn, closed. Clients must accept values not listed here.
expires_atstring or null (date-time)Required. When it lapses if nobody decides it (RFC 3339, UTC).
decided_atstring or null (date-time)Required. When it was decided; null while it waits.

One item an operation could not copy, or (a move that ended source-remains) one whose original is still at the source.

FieldTypeDescription
pathstringRequired. The item’s canonical path in the source share.
codestringRequired. Why, as a problem slug (the last segment of a problem type: download-blocked, invalid-path, not-found, …).

One page of a collection. Pass next_cursor back as ?cursor= for the next page; null on the last. Cursors are opaque: never build or change one.

FieldTypeDescription
itemsarray of OperationRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Used by: listOperations.

How far an operation has got. The totals are null until Foldr has counted what there is to do: nothing is guessed.

FieldTypeDescription
items_doneintegerRequired. Files and folders copied so far (the copied folder itself included).
items_totalinteger or nullRequired. Files and folders to do in all, or null until counted.
bytes_doneintegerRequired. Bytes of files done so far.
bytes_totalinteger or nullRequired. Bytes of files to do in all, or null until counted.

What an operation copies, or moves.

FieldTypeDescription
share_idstring (uuid)Required. The id of the share it is in.
pathstringRequired. Its canonical path.
kindstring, one of file, folderRequired. file or folder.

Where an operation was asked to put what it makes.

FieldTypeDescription
share_idstring (uuid)Required. The id of the share.
pathstringRequired. The path asked for, as sent (to_path).

A person, as far as a file record names them.

FieldTypeDescription
idstringRequired. The person’s id (their directory guid).
namestringRequired. Display name.

An error, as application/problem+json (RFC 9457). Branch on type (or code), never on title or detail.

FieldTypeDescription
typestring (uri)Required. What went wrong, as a URL: https://<host>/api/v1/problems/<slug>. New types may appear.
titlestringRequired. A short human summary of the type.
statusintegerRequired. The HTTP status.
codestringRequired. The same condition as an upper-case code, as Foldr’s other APIs name errors.
detailstring or nullMore about this occurrence, where there is anything safe to say.
instancestring or nullA fault code for this occurrence (”#” and 8 hex digits) to quote to support, where there is one.
operationOperation or nullWhere the problem is how an operation ended (getOperation on a failed or cancelled one): that operation, as it stands.

Used by: listFields, getMe, listOperations, getOperation, cancelOperation, search, listShareRequests, getShareRequest, listShares, getShare, listChildren, getContent, overwriteFile, copyItem, getDownloadUrl, getFieldValues, setFieldValue, uploadFile, createFolder, getItem, deleteItem, moveItem, renameItem, createShareRequest, listVersions, restoreVersion, createUploadSession, cancelUploadSession, completeUploadSession.

A file or folder to rename where it is.

FieldTypeDescription
pathstringRequired. The path of the file or folder to rename.
new_namestringRequired. Its new name: one name, no ”/”, no spaces at either end. Something already called that is never replaced (409 conflict).

Used by: renameItem.

A file, and which of its versions to make current again.

FieldTypeDescription
pathstringRequired. The path of the file.
version_idstringRequired. The version to restore: an id listVersions gave for this file.
as_copybooleantrue to write the version BESIDE the file as a new file named “name (3 Nov 2026 14.02).ext” (the first free name) and change nothing else. Needs no If-Match, is never refused for the file’s state (checked out, legal hold) and is not held for approval, because it replaces nothing. Default false: the version replaces the file.

Used by: restoreVersion.

One search result.

FieldTypeDescription
itemItemRequired. The item found, as the search index knows it.
scorenumber or nullRequired. Relevance: higher is better, comparable only within one response’s ordering.
snippetstring or nullRequired. A short passage of text around the match, where there is one and it may be shown.

One page of search results. Ordered by relevance within each search index; where the person’s shares sit in more than one index, the pages walk the indexes one after another. Pass next_cursor back as ?cursor= (with the same q and share_id) for the next page.

FieldTypeDescription
itemsarray of SearchHitRequired. This page’s hits.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last. A page can hold fewer hits than the limit and still not be the last.
total_estimateintegerRequired. About how many items match, over every index searched. An estimate: it is not a count of the pages to come.
not_searchedarray of NotSearchedRequired. The person’s shares this search did not cover, and why.

Used by: search.

A custom field value to set on one file.

FieldTypeDescription
pathstringRequired. The path of the file (files only).
valueanyRequired. The value: a string, a number, or true or false, as the field’s type takes (a date as 2027-01-31). A field with a list of allowed values takes one of them.

Used by: setFieldValue.

A share: a storage location the person can read. Files and folders are addressed by a share id plus a path inside it.

FieldTypeDescription
idstring (uuid)Required. The share’s id. Always a uuid.
namestringRequired. The share’s name, as people see it in Foldr.
typestringRequired. The kind of storage behind the share. New values may appear: treat an unknown one as “other”. Known values: smb, local, hosted, s3, b2, azure_blob, sftp, ftp, webdav, edge, google_drive, google_shared_drive, group_drive, onedrive, sharepoint, teams, dropbox, box, other. Clients must accept values not listed here.
indexedbooleanRequired. Whether the share is indexed for GET /search.
read_onlybooleanRequired. True when the person cannot change anything in the share.
reachablebooleanRequired. False when the share’s file server could not be reached just now. It still exists and is the person’s: try again in a few minutes.

Used by: getShare.

One page of a collection. Pass next_cursor back as ?cursor= for the next page; null on the last. Cursors are opaque: never build or change one.

FieldTypeDescription
itemsarray of ShareRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Used by: listShares.

A request to share a file or folder, made through an app. It waits for an approver; once approved, the sharing works in Foldr, where the person finds the link. Never carries a link or its address.

FieldTypeDescription
idstring (uuid)Required. The request’s id.
share_idstring (uuid)Required. The id of the share the item is in.
pathstringRequired. The item’s canonical path.
kindstringRequired. What was asked for. Known values: people, public_link, secure_link, inbox. Clients must accept values not listed here.
statusstringRequired. Where it stands: pending_approval until an approver decides; approved; declined (by an approver, or left undecided until it lapsed); withdrawn. Known values: pending_approval, approved, declined, withdrawn. Clients must accept values not listed here.
created_atstring or null (date-time)Required. When it was asked for (RFC 3339, UTC).
decided_atstring or null (date-time)Required. When it was decided, or null while it waits.

Used by: getShareRequest, createShareRequest.

What to share and how. A request always waits for an approver; nothing is shared until one approves it.

FieldTypeDescription
pathstringRequired. The path of the file or folder to share (an inbox needs a folder).
kindstring, one of people, public_link, secure_link, inboxRequired. people: people in the organisation; public_link: a link anyone with it can open; secure_link: a link for the outside email addresses named; inbox: an email address that files sent to it arrive in (a folder).
peoplearray or nullFor people: their email addresses, usernames or exact group names (at most 20).
permissionstring or null, one of read, write, nullFor people: “read” (the default) or “write”.
recipient_emailsarray or nullFor secure_link: the outside email addresses it is for (at most 20).
expiry_daysinteger or nullDays until access ends once approved; 0 or absent for never. For a link, -1 ends it after its first download.
messagestring or nullA note shown with the link (at most 1,000 characters).

Used by: createShareRequest.

One page of a collection. Pass next_cursor back as ?cursor= for the next page; null on the last. Cursors are opaque: never build or change one.

FieldTypeDescription
itemsarray of ShareRequestRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Used by: listShareRequests.

An upload straight to the share’s storage. Send the file to url with method and headers (in chunk_size pieces with Content-Range where chunk_size is set), then complete the session; or cancel it. The url is a credential for this one upload: do not log or share it.

FieldTypeDescription
idstringRequired. The session’s id, for complete and cancel.
modestringRequired. How the file is sent: direct, straight to the storage. Known values: direct. Clients must accept values not listed here.
share_idstring (uuid)Required. The id of the share.
pathstringRequired. The canonical path the file will have (on_conflict “rename” may have given it a new name).
sizeintegerRequired. The size declared, in bytes.
urlstring (uri)Required. Where to send the file.
methodstringRequired. The HTTP method to send it with (PUT or POST).
headersmap of stringRequired. Headers to send with it, exactly as given.
chunk_sizeinteger or nullRequired. Where set, send the file in pieces of at most this many bytes (a multiple of it, except the last), each with a Content-Range header; null: send it whole in one request.
expires_atstring or null (date-time)Required. Send the file before this time (RFC 3339, UTC); then the url stops working. Complete the session afterwards.

Used by: createUploadSession.

A file to upload straight to the share’s storage.

FieldTypeDescription
share_idstring (uuid)Required. The id of the share.
pathstringRequired. The new file’s full path in the share, its name last. The folder it goes in must exist.
sizeintegerRequired. The file’s exact size in bytes. Completing the session checks the storage holds exactly this many.
on_conflictstring, one of fail, renameWhat to do when something is already called that: “fail” (the default) answers 409 conflict; “rename” uploads it under the first free name. Nothing is ever replaced.
content_typestring or nullThe file’s media type, where the storage records one (default application/octet-stream).

Used by: createUploadSession.

One version of a file that its storage keeps: an earlier save (S3 and hosted storage, Azure, SharePoint) or a shadow copy (an SMB server’s Previous Versions).

FieldTypeDescription
idstringRequired. The version’s id, as the storage names it: what restoreVersion takes. Opaque; never build one.
modifiedstring or null (date-time)Required. When this version was saved (RFC 3339, UTC), where the storage says.
sizeinteger or nullRequired. Its size in bytes, where the storage says.
currentbooleanRequired. True for the version the file is now.

One page of a collection. Pass next_cursor back as ?cursor= for the next page; null on the last. Cursors are opaque: never build or change one.

FieldTypeDescription
itemsarray of VersionRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Used by: listVersions.