Docspell (0.42.0)

Download OpenAPI specification:Download

License: AGPLv3

This is the remote API to Docspell. Docspell is a free document management system focused on small groups or families.

The routes can be divided into protected, unprotected routes and admin routes. The unprotected, or open routes are at /open/* while the protected routes are at /sec/* and admin routes are at /admin/*. Open routes don't require authenticated access and can be used by any user. The protected routes require an authenticated user. The admin routes require a special http header with a value from the config file. They are disabled by default, you need to specify a secret in order to enable admin routes.

Information

Get version information.

Returns information about this software.

Responses

Response samples

Content type
application/json
{
  • "version": "string",
  • "builtAtMillis": 0,
  • "builtAtString": "string",
  • "gitCommit": "string",
  • "gitVersion": "string"
}

Authentication

Authenticate with account name and password.

Authenticate with account name and password. The account name is comprised of the collective id and user id separated by slash, backslash or whitespace.

If successful, an authentication token is returned that can be used for subsequent calls to protected routes.

If the account has two-factor auth enabled, the returned token must be used to supply the second factor.

Request Body schema: application/json
account
required
string
password
required
string
rememberMe
boolean

Responses

Request samples

Content type
application/json
{
  • "account": "string",
  • "password": "string",
  • "rememberMe": true
}

Response samples

Content type
application/json
{
  • "collective": "string",
  • "user": "string",
  • "success": true,
  • "message": "string",
  • "token": "string",
  • "validMs": 0,
  • "requireSecondFactor": true
}

Provide the second factor to finalize authentication

After a login with account name and password, a second factor must be supplied (only for accounts that enabled it) in order to complete login.

If the code is correct, a new token is returned that can be used for subsequent calls to protected routes.

Request Body schema: application/json
token
required
string
otp
required
string <password>
rememberMe
required
boolean

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "otp": "pa$$word",
  • "rememberMe": true
}

Response samples

Content type
application/json
{
  • "collective": "string",
  • "user": "string",
  • "success": true,
  • "message": "string",
  • "token": "string",
  • "validMs": 0,
  • "requireSecondFactor": true
}

Authenticates via OIDC at the external provider given by its id

Initiates the "Authorization Code Flow" as described in the OpenID Connect specification. This only is enabled, if an external provider has been configured correctly in the config file.

This will redirect to the external provider to authenticate the user. Once authenticated, the user is redirected back to the /resume endpoint.

path Parameters
providerId
required
string <ident>

Responses

The callback URL for the authentication provider

This URL is used to redirect the user back to the application by the authentication provider after login is completed.

This will then try to find (or create) the account at docspell using information about the user provided by the authentication provider. If the required information cannot be found, the user cannot be logged into the application.

If the process completed successfully, this endpoint redirects into the web application which will take over from here.

path Parameters
providerId
required
string <ident>

Responses

Authentication with a token

Authenticate with a token. This can be used to get a new authentication token based on another valid one.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "collective": "string",
  • "user": "string",
  • "success": true,
  • "message": "string",
  • "token": "string",
  • "validMs": 0,
  • "requireSecondFactor": true
}

Logout.

This route informs the server about a logout. This is not strictly necessary.

Authorizations:
authTokenHeader

Responses

Initialize two factor auth via OTP

Requests to enable two factor authentication for this user. A secret key is generated and returned. The client is expected to insert it into some OTP application. Currently, only time based OTP is supported.

The request body is empty.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "authenticatorUrl": "http://example.com",
  • "secret": "string",
  • "authType": "totp",
  • "issuer": "string"
}

Confirms two factor authentication

Confirms using two factor authentication by sending a one time password. If the password is correct, this enables two factor authentication for the current user.

If there exists no unapproved otp request or the password is not correct, an error is returned. If 2fa is already enabled for this account, success is returned.

Request Body schema: application/json
otp
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "otp": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Disables two factor authentication.

Disables two factor authentication for the current user. If the user has no two factor authentication enabled, an error is returned.

It requires to specify a valid otp.

After this completes successfully, two factor auth can be enabled again by initializing it anew.

Request Body schema: application/json
otp
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "otp": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Upload

Check if a file is in docspell (via source).

Checks if a file with the given SHA-256 checksum is in docspell. The id is a source id configured by a collective.

The result shows all items that contains a file with the given checksum.

path Parameters
id
required
string

An identifier

checksum
required
string

A SHA-256 checksum

Responses

Response samples

Content type
application/json
{
  • "exists": true,
  • "items": [
    ]
}

Upload files to docspell (via source).

Upload a file to docspell for processing. The id is a source id configured by a collective. Files are submitted for processing which eventually resuts in an item in the inbox of the corresponding collective.

The request must be a multipart/form-data request, where the first part has name meta, is optional and may contain upload metadata as JSON. Checkout the structure ItemUploadMeta at the end if it is not shown here. Other parts specify the files. Multiple files can be specified, but at least on is required.

The upload meta data can be used to tell, whether multiple files are one item, or if each file should become a single item. By default, each file will be a one item.

path Parameters
id
required
string

An identifier

Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Upload files to an existing item (via source).

Upload a file to docspell for processing. The id is a source id configured by a collective. Files are submitted for processing which eventually resuts in an item in the inbox of the corresponding collective. This endpoint associates the files to an existing item identified by its itemId.

The request must be a multipart/form-data request, where the first part has name meta, is optional and may contain upload metadata as JSON. Checkout the structure ItemUploadMeta at the end if it is not shown here. Other parts specify the files. Multiple files can be specified, but at least on is required.

Upload meta data is ignored.

path Parameters
id
required
string

An identifier

itemId
required
string

An identifier for an item

Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Check if a file is in docspell (authenticated).

Checks if a file with the given SHA-256 checksum is in docspell.

The result shows all items that contains a file with the given checksum.

Authorizations:
authTokenHeader
path Parameters
checksum
required
string

A SHA-256 checksum

Responses

Response samples

Content type
application/json
{
  • "exists": true,
  • "items": [
    ]
}

Upload files to docspell (authenticated).

Upload files to docspell for processing. This route is meant for authenticated users that upload files to their account.

Everything else is the same as with the /open/upload/item/{id} endpoint.

The request must be a "multipart/form-data" request, where the first part is optional and may contain upload metadata as JSON. Other parts specify the files. Multiple files can be specified, but at least one is required.

The upload meta data can be used to tell, whether multiple files are one item, or if each file should become a single item. By default, each file will be a one item.

Authorizations:
authTokenHeader
Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Upload files to an existing item (authenticated).

Upload files to docspell for processing. This route is meant for authenticated users that upload files to their account. This endpoint will associate the files to an existing item identified by its itemId.

Everything else is the same as with the /open/upload/item/{itemId}/{id} endpoint.

The request must be a "multipart/form-data" request, where the first part is optional and may contain upload metadata as JSON. Other parts specify the files. Multiple files can be specified, but at least on is required.

The upload meta data is ignored, since the item already exists.

Authorizations:
authTokenHeader
path Parameters
itemId
required
string

An identifier for an item

Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Upload files to docspell (Integration Endpoint).

Upload a file to docspell for processing. The id is a collective name. This route only exists, if enabled by an admin in the configuration. The route might be protected by different methods, all configurable via the configuration:

  • A specific header must be prestent
  • username/password via HTTP Basic mechanism
  • a specific source ip

Files are submitted for processing to the specified collective, which eventually resuts in an item in their inbox.

The request must be a multipart/form-data request, where the first part has name meta, is optional and may contain upload metadata as JSON. Checkout the structure ItemUploadMeta at the end if it is not shown here. Other parts specify the files. Multiple files can be specified, but at least on is required.

path Parameters
id
required
string

An identifier

Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Check if a file is in docspell (Integration Endpoint).

Checks if a file with the given SHA-256 checksum is in docspell. The id is the collective name. This route only exists, if it is enabled in the configuration file.

The result shows all items that contains a file with the given checksum.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

checksum
required
string

A SHA-256 checksum

Responses

Response samples

Content type
application/json
{
  • "exists": true,
  • "items": [
    ]
}

Full-Text Index

Re-creates the full-text index.

Clears the full-text index and inserts all data from the database. This migh take a while to complete. The response returns immediately. A task is submitted that will be executed by a job executor. Note that this affects all data of all collectives.

This is an admin route, so you need to provide the secret from the config file as header Docspell-Admin-Secret.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Re-creates the full-text index for the current collective

Clears the full-text index for all data belonging to the current collective and inserts the data from the database. The response is immediately returned and a task is submitted that will be executed by a job executor.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Admin

Re-creates the full-text index.

Clears the full-text index and inserts all data from the database. This migh take a while to complete. The response returns immediately. A task is submitted that will be executed by a job executor. Note that this affects all data of all collectives.

This is an admin route, so you need to provide the secret from the config file as header Docspell-Admin-Secret.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Reset a user password.

Resets a user password to some random string which is returned as the result. This is an admin route, so you need to specify the secret from the config file via a http header Docspell-Admin-Secret.

Authorizations:
adminHeader
Request Body schema: application/json
account
required
string <accountid>

Responses

Request samples

Content type
application/json
{
  • "account": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "newPassword": "pa$$word",
  • "message": "string"
}

Disables OTP two factor auth for the given user.

Removes the OTP setup for the given user account. The account can login afterwards with a correct password. A second factor is not required. Two factor auth can be setup again for this account.

Authorizations:
adminHeader
Request Body schema: application/json
account
required
string <accountid>

Responses

Request samples

Content type
application/json
{
  • "account": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

(Re)generate all preview images

Submits a task that re-generates preview images of all attachments. Each existing preview image will be replaced.

This can be used after changing the preview settings.

If only preview images of selected attachments should be regenerated, see the /sec/attachment/{id}/preview endpoint.

This is an admin route, you need to specify the secret from the config file via a http header Docspell-Admin-Secret.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Convert all PDF files not yet converted

Docspell converts PDF files into PDF/A files by default, if the OcrMyPDF tool is configured.

This endpoint can be used to submit a task that runs this on all files that have not been converted yet in this way.

This conversion tool has been added in version 0.9.0 and so older files can be "migrated" this way, or maybe after enabling the tool (it is optional).

The task finds all files collective and submits a task for each file to convert. These tasks are submitted with a low priority so that normal processing can still proceed.

The body of the request should be empty.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Copy all files into a new repository

Submits a task that will copy all files of the application (from the default file repository) into another file repository as specified in the request. The request may define ids of file repository configurations that must be present in the config file. An empty list means to copy to all enabled file repositories from te default file repository.

Authorizations:
adminHeader
Request Body schema: application/json
targetRepositories
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "targetRepositories": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Verifies the stored checksum

Submits a task that goes through the files and compares the stored checksum (at the time of inserting) against a newly calculated one.

Authorizations:
adminHeader
Request Body schema: application/json
collective
string <ident>

Responses

Request samples

Content type
application/json
{
  • "collective": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Download

Return information about a potential zip download

This endpoint calculates the number of files and (uncompressed) size of the zip file that would be created with this request.

It also checks against configured thresholds and tells whether the server allows to ask for a download using this query.

Authorizations:
authTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Submits a job to create a zip containing all files in the query

A job is submitted to create a ZIP file containing all the files that are included in the given query.

Once the job is done, the returned ID can be used to download the zip file.

Authorizations:
authTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Cancels potentially running jobs to create a download archive

If a job is running (created via the submit endpoint) to prepare a zip file for download, it is cancelled. The id is the download id as defined in the prefetch or submit responses.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Download the zip file given the id

Download the zip file to the given id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Deletets the zip file given the id

Deletes the zip file to the given id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Return information about a potential zip download

This endpoint calculates the number of files and (uncompressed) size of the zip file that would be created with this request.

It also checks against configured thresholds and tells whether the server allows to ask for a download using this query.

This variant adds the query of the share and the fileType property in the request is ignored. It is always fixed to converted.

Authorizations:
shareTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Submits a job to create a zip containing all files in the query

A job is submitted to create a ZIP file containing all the files that are included in the given query.

Once the job is done, the returned ID can be used to download the zip file.

This variant adds the query of the share and the fileType property in the request is ignored. It is always fixed to converted.

Authorizations:
shareTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Download the zip file given the id

Download the zip file to the given id.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Integration Endpoint

Check if integration endpoint is available.

Allows to check whether an integration endpoint is enabled for a collective. The collective is given by the id parameter. It returns not found (404) if the endpoint is disabled (either globally by an admin or by a specific collective). It returns 403 (or 401 if http-basic is enabled) if authorization fails.

The response body is empty (an empty json object).

path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{ }

Upload files to docspell (Integration Endpoint).

Upload a file to docspell for processing. The id is a collective name. This route only exists, if enabled by an admin in the configuration. The route might be protected by different methods, all configurable via the configuration:

  • A specific header must be prestent
  • username/password via HTTP Basic mechanism
  • a specific source ip

Files are submitted for processing to the specified collective, which eventually resuts in an item in their inbox.

The request must be a multipart/form-data request, where the first part has name meta, is optional and may contain upload metadata as JSON. Checkout the structure ItemUploadMeta at the end if it is not shown here. Other parts specify the files. Multiple files can be specified, but at least on is required.

path Parameters
id
required
string

An identifier

Request Body schema: multipart/form-data
object (ItemUploadMeta)

Meta information for an item upload. The user can specify some structured information with a binary file.

Additional metadata is not required. However, if there is some specified, you have to specifiy whether the corresponding files should become one single item or if an item is created for each file.

file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Check if a file is in docspell (Integration Endpoint).

Checks if a file with the given SHA-256 checksum is in docspell. The id is the collective name. This route only exists, if it is enabled in the configuration file.

The result shows all items that contains a file with the given checksum.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

checksum
required
string

A SHA-256 checksum

Responses

Response samples

Content type
application/json
{
  • "exists": true,
  • "items": [
    ]
}

Registration

Register a new account.

Create a new account by creating a collective and user.

Request Body schema: application/json
collectiveName
required
string <ident>
login
required
string <ident>
password
required
string <password>
invite
string <ident>

Responses

Request samples

Content type
application/json
{
  • "collectiveName": "string",
  • "login": "string",
  • "password": "pa$$word",
  • "invite": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Generate a new invite.

When signup mode is set to "invite", docspell requires an invitation key when signing up. These keys can be created here. Creating such keys requires an admin role, and since docspell has no such concept, a password from the configuration file is required for this action.

Request Body schema: application/json
password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "key": "string"
}

Share

Verify a secret for a share

Given the share id and optionally a password, it verifies the correctness of the given data. As a result, a token is returned that must be used with all share/* routes. If the password is missing, but required, the response indicates this. Then the requests needs to be replayed with the correct password to retrieve the token.

The token is also added as a session cookie to the response.

The token is used to avoid passing the user define password with every request.

Request Body schema: application/json
shareId
required
string <ident>
password
string <password>

Responses

Request samples

Content type
application/json
{
  • "shareId": "string",
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "token": "string",
  • "passwordRequired": true,
  • "message": "string",
  • "name": "string"
}

Performs a search in a share.

Allows to run a search query in the shared documents. The input data structure is the same as with a standard query. The searchMode parameter is ignored here.

Authorizations:
shareTokenHeader
Request Body schema: application/json
offset
integer <int32>
limit
integer <int32>

The maximum number of results to return. Note that this limit is a soft limit, there is some hard limit on the server, too.

withDetails
boolean
Default: false
searchMode
string <searchmode>
Default: "normal"
Enum: "normal" "trashed" "all"

Specify whether the search query should apply to soft-deleted items or not.

query
required
string

A query searching the contents of documents.

Responses

Request samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "withDetails": false,
  • "searchMode": "normal",
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "groups": [
    ],
  • "limit": 0,
  • "offset": 0,
  • "limitCapped": true
}

Get basic statistics about search results.

Instead of returning the results of a query, uses it to return a summary, constraint to the share.

Authorizations:
shareTokenHeader
Request Body schema: application/json
offset
integer <int32>
limit
integer <int32>

The maximum number of results to return. Note that this limit is a soft limit, there is some hard limit on the server, too.

withDetails
boolean
Default: false
searchMode
string <searchmode>
Default: "normal"
Enum: "normal" "trashed" "all"

Specify whether the search query should apply to soft-deleted items or not.

query
required
string

A query searching the contents of documents.

Responses

Request samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "withDetails": false,
  • "searchMode": "normal",
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "tagCloud": {
    },
  • "tagCategoryCloud": {
    },
  • "fieldStats": [
    ],
  • "folderStats": [
    ],
  • "corrOrgStats": [
    ],
  • "corrPersStats": [
    ],
  • "concPersStats": [
    ],
  • "concEquipStats": [
    ]
}

Get details about an item.

Get detailed information about an item.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "direction": "incoming",
  • "name": "string",
  • "source": "string",
  • "state": "string",
  • "created": 0,
  • "updated": 0,
  • "itemDate": 0,
  • "corrOrg": {
    },
  • "corrPerson": {
    },
  • "concPerson": {
    },
  • "concEquipment": {
    },
  • "folder": {
    },
  • "dueDate": 0,
  • "notes": "string",
  • "attachments": [
    ],
  • "sources": [
    ],
  • "archives": [
    ],
  • "tags": [
    ],
  • "customfields": [
    ],
  • "relatedItems": [
    ]
}

Get headers to an attachment file.

Get information about the binary file belonging to the attachment with the given id.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get an attachment file.

Get the binary file belonging to the attachment with the given id. The binary is a pdf file. If conversion failed, then the original file is returned.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

A javascript rendered view of the pdf attachment

This provides a preview of the attachment rendered in a browser.

It currently uses a third-party javascript library (viewerjs) to display the preview. This works by redirecting to the viewerjs url with the attachment url as parameter. Note that the resulting url that is redirected to is not stable. It may change from version to version. This route, however, is meant to provide a stable url for the preview.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get the headers to a preview image of an attachment file.

Checks if an image file showing a preview of the attachment is available. If not available, a 404 is returned.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get a preview image of an attachment file.

Gets a image file showing a preview of the attachment. Usually it is a small image of the first page of the document.If not available, a 404 is returned. However, if the query parameter withFallback is true, a fallback preview image is returned. You can also use the HEAD method to check for existence.

The attachment must be in the search results of the current share.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

query Parameters
withFallback
boolean

Whether to provide a fallback or not.

Responses

Return the client settings of current user

Returns the settings for the share. This is the settings of the collective that belongs to the share.

The clientId is an identifier to a client application. It returns a JSON structure. The server doesn't care about the actual data, since it is meant to be interpreted by clients.

Authorizations:
shareTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
null

Return information about a potential zip download

This endpoint calculates the number of files and (uncompressed) size of the zip file that would be created with this request.

It also checks against configured thresholds and tells whether the server allows to ask for a download using this query.

This variant adds the query of the share and the fileType property in the request is ignored. It is always fixed to converted.

Authorizations:
shareTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Submits a job to create a zip containing all files in the query

A job is submitted to create a ZIP file containing all the files that are included in the given query.

Once the job is done, the returned ID can be used to download the zip file.

This variant adds the query of the share and the fileType property in the request is ignored. It is always fixed to converted.

Authorizations:
shareTokenHeader
Request Body schema: application/json
query
required
string <itemquery>
fileType
required
string <downloadalltype>
Enum: "converted" "original"

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fileType": "converted"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fileCount": 0,
  • "uncompressedSize": 0,
  • "state": "forbidden"
}

Download the zip file given the id

Download the zip file to the given id.

Authorizations:
shareTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get a list of shares

Return a list of all shares for this collective.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

owning
boolean

Return my own shares only

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new share.

Create a new share.

Authorizations:
authTokenHeader
Request Body schema: application/json
name
string
query
required
string <itemquery>
enabled
required
boolean
password
string <password>
publishUntil
required
integer <date-time>
removePassword
boolean

For an update request, this can control whether to delete the password. Otherwise if the password is not set, it will not be changed. When adding a new share, this has no effect.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "query": "string",
  • "enabled": true,
  • "password": "pa$$word",
  • "publishUntil": 0,
  • "removePassword": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "id": "string"
}

Send an email.

Sends an email as specified in the body of the request.

An existing shareId must be given with the request, no matter the content of the mail.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Request Body schema: application/json
shareId
required
string <ident>
recipients
required
Array of strings
cc
required
Array of strings
bcc
required
Array of strings
subject
required
string
body
required
string

Responses

Request samples

Content type
application/json
{
  • "shareId": "string",
  • "recipients": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "subject": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get details to a single share.

Given the id of a share, returns some details about it.

Authorizations:
authTokenHeader
path Parameters
shareId
required
string

An identifier for a share

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "query": "string",
  • "owner": {
    },
  • "name": "string",
  • "enabled": true,
  • "publishAt": 0,
  • "publishUntil": 0,
  • "expired": true,
  • "password": true,
  • "views": 0,
  • "lastAccess": 0
}

Update an existing share.

Updates an existing share.

Authorizations:
authTokenHeader
path Parameters
shareId
required
string

An identifier for a share

Request Body schema: application/json
name
string
query
required
string <itemquery>
enabled
required
boolean
password
string <password>
publishUntil
required
integer <date-time>
removePassword
boolean

For an update request, this can control whether to delete the password. Otherwise if the password is not set, it will not be changed. When adding a new share, this has no effect.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "query": "string",
  • "enabled": true,
  • "password": "pa$$word",
  • "publishUntil": 0,
  • "removePassword": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a share.

Deletes a share

Authorizations:
authTokenHeader
path Parameters
shareId
required
string

An identifier for a share

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Tags

Get a list of tags

Return a list of all configured tags. The sort query parameter is optional and can specify how the list is sorted. Possible values are: name, -name, category, -category.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

sort
string

How to sort the returned list

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "items": [
    ]
}

Create a new tag.

Create a new tag. If a tag with this name already exists, an error is returned. The id in the input structure is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
category
string
created
required
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "category": "string",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing tag.

Changes an existing tag. The tag is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
category
string
created
required
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "category": "string",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a tag.

Deletes a tag. This also removes this tags from all items.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Organization

Get a list of organizations.

Return a list of all organizations. Only name and id are returned. If full is specified, the list contains all organization data. The sort parameter can be either name or -name to specify the order.

Authorizations:
authTokenHeader
query Parameters
full
boolean

Whether to list full data or just name and id.

q
string

A query string.

sort
string

How to sort the returned list

Responses

Response samples

Content type
application/json
Example
{
  • "items": [
    ]
}

Create a new organization.

Create a new organizaion. If an organization with this name already exists, an error is returned. The id attribute of the request structure is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
created
required
integer <date-time>

DateTime

shortName
string
use
required
string <orguse>
Enum: "correspondent" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "created": 0,
  • "shortName": "string",
  • "use": "correspondent"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing organization.

Changes an existing organization. The organization is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
created
required
integer <date-time>

DateTime

shortName
string
use
required
string <orguse>
Enum: "correspondent" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "created": 0,
  • "shortName": "string",
  • "use": "correspondent"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get a list of organizations.

Return details about an organization.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "created": 0,
  • "shortName": "string",
  • "use": "correspondent"
}

Delete a organization by its id.

Deletes an organization.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Person

Get a list of persons.

Return a list of all persons. Only name and id are returned unless the full parameter is specified. The sort parameter can be used to control the order of the result. Use one of: name, -name, org, -org. Note that order by org only works when retrieving the full list.

Authorizations:
authTokenHeader
query Parameters
full
boolean

Whether to list full data or just name and id.

q
string

A query string.

sort
string

How to sort the returned list

Responses

Response samples

Content type
application/json
Example
{
  • "items": [
    ]
}

Create a new person.

Create a new organizaion. If an person with this name already exists, an error is returned. The id attribute of the request structure is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
object (IdName)

The identifier and a human readable name of some entity.

required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
use
required
string <personuse>
Enum: "concerning" "correspondent" "both" "disabled"

Whether this person should be used to create suggestions for the "concerning person", "correspondent" or both.

created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "organization": {
    },
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "use": "concerning",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing person.

Changes an existing person. The person is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
object (IdName)

The identifier and a human readable name of some entity.

required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
use
required
string <personuse>
Enum: "concerning" "correspondent" "both" "disabled"

Whether this person should be used to create suggestions for the "concerning person", "correspondent" or both.

created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "organization": {
    },
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "use": "concerning",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get person details.

Return details about an person.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "organization": {
    },
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "use": "concerning",
  • "created": 0
}

Delete a person by its id.

Deletes an person.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Equipment

Get a list of equipments

Return a list of all configured equipments. The sort query parameter is optional and can be one of name or -name to sort the list of equipments.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

sort
string

How to sort the returned list

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new equipment.

Create a new equipment. If a equipment with this name already exists, an error is returned.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
created
required
integer <date-time>

DateTime

notes
string
use
required
string <equipmentuse>
Enum: "concerning" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "created": 0,
  • "notes": "string",
  • "use": "concerning"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing equipment.

Changes an existing equipment. The equipment is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
created
required
integer <date-time>

DateTime

notes
string
use
required
string <equipmentuse>
Enum: "concerning" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "created": 0,
  • "notes": "string",
  • "use": "concerning"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get details about a single equipment.

Loads one equipment by its id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "created": 0,
  • "notes": "string",
  • "use": "concerning"
}

Delete a equipment.

Deletes a equipment. This also removes this equipments from all items.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Folder

Get a list of folders.

Return a list of folders for the current collective.

All folders are returned, including those not owned by the current user.

It is possible to restrict the results by a substring match of the name.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

full
boolean

Whether to get owning folders

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new folder

Create a new folder owned by the current user. If a folder with the same name already exists, an error is thrown.

Authorizations:
authTokenHeader
Request Body schema: application/json
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "id": "string"
}

Get folder details.

Return details about a folder.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "owner": {
    },
  • "created": 0,
  • "isMember": true,
  • "memberCount": 0,
  • "members": [
    ]
}

Change the name of a folder

Changes the name of a folder. The new name must not exists.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a folder by its id.

Deletes a folder.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Add a member to this folder

Adds a member to this folder (identified by id).

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

userId
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Removes a member from this folder.

Removes a member from this folder.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

userId
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Collective

Get information about your collective

Return some information about the current collective.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "created": 0
}

Get collective settings

Return the settings of a collective.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "language": "string",
  • "integrationEnabled": true,
  • "classifier": {
    },
  • "emptyTrash": {
    },
  • "passwords": [
    ]
}

Update settings for a collective

Updates settings for a collective.

Authorizations:
authTokenHeader
Request Body schema: application/json
language
required
string <language>
integrationEnabled
required
boolean

Whether the collective has the integration endpoint enabled.

required
object (ClassifierSetting)

Settings for learning a document classifier.

required
object (EmptyTrashSetting)

Settings for clearing the trash of items.

passwords
required
Array of strings <password> [ items <password > ]

Responses

Request samples

Content type
application/json
{
  • "language": "string",
  • "integrationEnabled": true,
  • "classifier": {
    },
  • "emptyTrash": {
    },
  • "passwords": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "created": 0
}

Get some insights regarding your items.

Returns some information about how many items there are, how much folder they occupy etc.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "incomingCount": 0,
  • "outgoingCount": 0,
  • "deletedCount": 0,
  • "itemSize": 0,
  • "tagCloud": {
    }
}

Summary of used tags.

Returns all tags and how often each has been applied.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Return a list of contacts.

Return a list of all contacts available from the collectives address book.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

kind
string

One of the available contact kinds.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Starts the learn-classifier task

If the collective has classification enabled, this will submit the task for learning a classifier from existing data. This task is usally run periodically as determined by the collective settings.

The request is empty, settings are used from the collective.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Starts the empty trash task

Submits a task to remove all items from the database that have been "soft-deleted". This task is also run periodically and can be triggered here to be immediatly submitted.

The request is empty, settings are used from the collective.

Authorizations:
authTokenHeader
Request Body schema: application/json
schedule
required
string <calevent>
minAge
required
integer <duration>

Responses

Request samples

Content type
application/json
{
  • "schedule": "string",
  • "minAge": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get a list of collective users.

Return a list of all users of the collective.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new collective user.

Create a new collective user. If a user with this name already exists, an error is returned.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
login
required
string <ident>
state
required
string <userstate>
Enum: "active" "disabled"
source
required
string <accountsource>
Enum: "local" "openid"
password
string <password>
email
string
lastLogin
integer <date-time>

DateTime

loginCount
required
integer <int32>
created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "login": "string",
  • "state": "active",
  • "source": "local",
  • "password": "pa$$word",
  • "email": "string",
  • "lastLogin": 0,
  • "loginCount": 0,
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing user.

Changes an existing user. The user is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
login
required
string <ident>
state
required
string <userstate>
Enum: "active" "disabled"
source
required
string <accountsource>
Enum: "local" "openid"
password
string <password>
email
string
lastLogin
integer <date-time>

DateTime

loginCount
required
integer <int32>
created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "login": "string",
  • "state": "active",
  • "source": "local",
  • "password": "pa$$word",
  • "email": "string",
  • "lastLogin": 0,
  • "loginCount": 0,
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a user by its id or login name.

Deletes a user.

Authorizations:
authTokenHeader
path Parameters
username
required
string

The username of a user of this collective

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Shows some data that would be deleted if the user is deleted

Gets some data that would be deleted, when the user with the given username is deleted. The username must be part of this collective.

Authorizations:
authTokenHeader
path Parameters
username
required
string

The username of a user of this collective

Responses

Response samples

Content type
application/json
{
  • "folders": [
    ],
  • "sentMails": 0,
  • "shares": 0
}

Change the password.

Allows users to change their password.

Authorizations:
authTokenHeader
Request Body schema: application/json
currentPassword
required
string <password>
newPassword
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "currentPassword": "pa$$word",
  • "newPassword": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Gets the otp state for the current user.

Returns whether the current account as OTP enabled or not.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "created": 0
}

Initialize two factor auth via OTP

Requests to enable two factor authentication for this user. A secret key is generated and returned. The client is expected to insert it into some OTP application. Currently, only time based OTP is supported.

The request body is empty.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "authenticatorUrl": "http://example.com",
  • "secret": "string",
  • "authType": "totp",
  • "issuer": "string"
}

Confirms two factor authentication

Confirms using two factor authentication by sending a one time password. If the password is correct, this enables two factor authentication for the current user.

If there exists no unapproved otp request or the password is not correct, an error is returned. If 2fa is already enabled for this account, success is returned.

Request Body schema: application/json
otp
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "otp": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Disables two factor authentication.

Disables two factor authentication for the current user. If the user has no two factor authentication enabled, an error is returned.

It requires to specify a valid otp.

After this completes successfully, two factor auth can be enabled again by initializing it anew.

Request Body schema: application/json
otp
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "otp": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Reset a user password.

Resets a user password to some random string which is returned as the result. This is an admin route, so you need to specify the secret from the config file via a http header Docspell-Admin-Secret.

Authorizations:
adminHeader
Request Body schema: application/json
account
required
string <accountid>

Responses

Request samples

Content type
application/json
{
  • "account": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "newPassword": "pa$$word",
  • "message": "string"
}

Disables OTP two factor auth for the given user.

Removes the OTP setup for the given user account. The account can login afterwards with a correct password. A second factor is not required. Two factor auth can be setup again for this account.

Authorizations:
adminHeader
Request Body schema: application/json
account
required
string <accountid>

Responses

Request samples

Content type
application/json
{
  • "account": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Notification

Return notification channels of the current user

Returns a list of notification channels for the current user.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "channelType": "string",
  • "connection": "string",
  • "recipients": [
    ]
}

Create a new notification channel

Creates a new channel that can be used for notification.

Authorizations:
authTokenHeader
Request Body schema: application/json
One of
id
required
string <ident>
name
string
channelType
required
string <channeltype>
connection
required
string <ident>
recipients
required
Array of strings

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "channelType": "string",
  • "connection": "string",
  • "recipients": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change a notification channel

Change details about a notification channel.

Authorizations:
authTokenHeader
Request Body schema: application/json
One of
id
required
string <ident>
name
string
channelType
required
string <channeltype>
connection
required
string <ident>
recipients
required
Array of strings

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "channelType": "string",
  • "connection": "string",
  • "recipients": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a channel

Deletes the channel with the given id. This causes all hooks of this channel to be deleted as well.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Return list of all hooks

Returns a list of all defined hooks for the current user.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a new notification hook

Creates a new notification hook, that issues a request via the given channel description.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
Array of objects (NotificationChannelRef)
allEvents
required
boolean
eventFilter
string <jsonminiq>

A filter expression that is applied to the event to be able to ignore a subset of them. See its documentation.

events
required
Array of strings <eventtype> [ items <eventtype > ]
Items Enum: "tagsAdded" "tagsSet"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "channels": [
    ],
  • "allEvents": true,
  • "eventFilter": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Updates a notification hook

Updates the hook details.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
Array of objects (NotificationChannelRef)
allEvents
required
boolean
eventFilter
string <jsonminiq>

A filter expression that is applied to the event to be able to ignore a subset of them. See its documentation.

events
required
Array of strings <eventtype> [ items <eventtype > ]
Items Enum: "tagsAdded" "tagsSet"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "channels": [
    ],
  • "allEvents": true,
  • "eventFilter": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a hook

Deletes the hook with the given id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Test a webhook

Tests the webhook specified in the body by applying it to a sample event.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
Array of objects (NotificationChannelRef)
allEvents
required
boolean
eventFilter
string <jsonminiq>

A filter expression that is applied to the event to be able to ignore a subset of them. See its documentation.

events
required
Array of strings <eventtype> [ items <eventtype > ]
Items Enum: "tagsAdded" "tagsSet"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "channels": [
    ],
  • "allEvents": true,
  • "eventFilter": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "messages": [
    ]
}

Verify a json filter expression

Parses the given value into a JSON mini query.

Authorizations:
authTokenHeader
Request Body schema: application/json
value
required
string

Responses

Request samples

Content type
application/json
{
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Provide sample event data

Given an event type, generate some random sample of what would be send on such an event.

Authorizations:
authTokenHeader
Request Body schema: application/json
eventType
required
string <eventtype>

Responses

Request samples

Content type
application/json
{
  • "eventType": "string"
}

Response samples

Content type
application/json
null

Query Bookmarks

Return all query bookmarks

Returns all query bookmarks of the current user.

Bookmarks can be "global", where they belong to the whole collective or personal, so they are only for the user. This returns both.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new query bookmark

Creates a new query bookmark.

A bookmark must have a unique name (within both collective and personal scope). If a name already exists, a failure is returned - use PUT instead for changing existing bookmarks.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
label
string
query
required
string <itemquery>
personal
required
boolean
created
required
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "label": "string",
  • "query": "string",
  • "personal": true,
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change a query bookmark

Changes an existing query bookmark.

A bookmark must have a unique name within the collective (considering collective and personal scope). The bookmark is identified by its id, which must exist.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
label
string
query
required
string <itemquery>
personal
required
boolean
created
required
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "label": "string",
  • "query": "string",
  • "personal": true,
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a bookmark.

Deletes a bookmarks by its id.

path Parameters
bookmarkId
required
string

An identifier for a bookmark

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Client Settings

Return the client settings of current user

Returns the settings for the current user by merging the client settings for the collective and the user's own client settings into one json structure.

Null, Array, Boolean, String and Number are treated as values, and values from the users settings completely replace values from the collective's settings.

The clientId is an identifier to a client application. It returns a JSON structure. The server doesn't care about the actual data, since it is meant to be interpreted by clients.

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
null

Return the user's own client settings

Returns the settings for the current user. The clientId is an identifier to a client application. It returns a JSON structure. The server doesn't care about the actual data, since it is meant to be interpreted by clients.

If there is nothing stored for the given clientId an empty JSON object ({}) is returned!

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
null

Update client settings of current user

Updates (replaces or creates) the current user's settings with the given data. The clientId is an identifier to a client application. The request body is expected to be JSON, the structure is not important to the server.

The data is stored for the current user and given clientId.

The data is only saved without being checked in any way (besides being valid JSON). It is returned "as is" to the client in the corresponding GET endpoint.

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Clears client settings of current user

Removes all stored user settings for the client identified by clientId.

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Return collective client settings

Returns the settings for the current collective. The clientId is an identifier to a client application. It returns a JSON structure. The server doesn't care about the actual data, since it is meant to be interpreted by clients.

If there is nothing stored for the given clientId an empty JSON object ({}) is returned!

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
null

Update collective client settings

Updates (replaces or creates) the current collective's settings with the given data. The clientId is an identifier to a client application. The request body is expected to be JSON, the structure is not important to the server.

The data is stored for the current user and given clientId.

The data is only saved without being checked in any way (besides being valid JSON). It is returned "as is" to the client in the corresponding GET endpoint.

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Clears collective's client settings

Removes all stored client settings of id clientId for collective.

Authorizations:
authTokenHeader
path Parameters
clientId
required
string

some identifier for a client application

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Attachment

(Re)generate all preview images

Submits a task that re-generates preview images of all attachments. Each existing preview image will be replaced.

This can be used after changing the preview settings.

If only preview images of selected attachments should be regenerated, see the /sec/attachment/{id}/preview endpoint.

This is an admin route, you need to specify the secret from the config file via a http header Docspell-Admin-Secret.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Convert all PDF files not yet converted

Docspell converts PDF files into PDF/A files by default, if the OcrMyPDF tool is configured.

This endpoint can be used to submit a task that runs this on all files that have not been converted yet in this way.

This conversion tool has been added in version 0.9.0 and so older files can be "migrated" this way, or maybe after enabling the tool (it is optional).

The task finds all files collective and submits a task for each file to convert. These tasks are submitted with a low priority so that normal processing can still proceed.

The body of the request should be empty.

Authorizations:
adminHeader

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get a preview image of an attachment file.

Checks if an image file showing a preview of the item is available. If not available, a 404 is returned. The preview is an image of the first page of the first attachment.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get a preview image of an attachment file.

Gets a image file showing a preview of the item. Usually it is a small image of the first page of the first attachment. If not available, a 404 is returned. However, if the query parameter withFallback is true, a fallback preview image is returned. You can also use the HEAD method to check for existence.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

query Parameters
withFallback
boolean

Whether to provide a fallback or not.

Responses

Delete an attachment.

Deletes a single attachment with all its related data like file, the original file, extracted text, results from analysis etc.

If the attachment is part of an archive, the archive is only deleted, if it is the last entry left. Archives are otherwise not deleted, if there are remaining attachments available.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get headers to an attachment file.

Get information about the binary file belonging to the attachment with the given id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get an attachment file.

Get the binary file belonging to the attachment with the given id. The binary is a pdf file. If conversion failed, then the original file is returned.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get headers of the original file of an attachment.

Get information about the original binary file of the attachment with the given id.

If the attachment is a converted PDF file, this route gets the original file as it was uploaded.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get the original file of an attachment.

Get the original binary file of the attachment with the given id.

If the attachment is a converted PDF file, this route gets the original file as it was uploaded.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get headers of the archive file to an attachment.

Get information about the archive that contains the attachment with the given id.

If the attachment was not uploaded as part of an archive, 404 is returned.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get the archive file of an attachment.

Get the archive file that was originally uploaded that contains the attachment with the given id.

If the attachment was not uploaded as part of an archive, a 404 is returned.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get the headers to a preview image of an attachment file.

Checks if an image file showing a preview of the attachment is available. If not available, a 404 is returned.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Get a preview image of an attachment file.

Gets a image file showing a preview of the attachment. Usually it is a small image of the first page of the document.If not available, a 404 is returned. However, if the query parameter withFallback is true, a fallback preview image is returned. You can also use the HEAD method to check for existence.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

query Parameters
withFallback
boolean

Whether to provide a fallback or not.

Responses

(Re)generate a preview image.

Submits a task that generates a preview image for this attachment. The existing preview will be replaced.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get the attachment's meta data.

Get meta data for this attachment. The meta data has been extracted from the contents.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "content": "string",
  • "labels": [
    ],
  • "proposals": {
    }
}

A javascript rendered view of the pdf attachment

This provides a preview of the attachment rendered in a browser.

It currently uses a third-party javascript library (viewerjs) to display the preview. This works by redirecting to the viewerjs url with the attachment url as parameter. Note that the resulting url that is redirected to is not stable. It may change from version to version. This route, however, is meant to provide a stable url for the preview.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Changes the name of an attachment

Change the name of the attachment with the given id. The attachment must be part of an item that belongs to the collective of the current user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
text
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get the extracted text of the given attachment.

Returns the extracted text of the attachment with the given id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "text": "string"
}

Changes the extracted text for an attachment

Changes the extracted text of the attachment with the given id. The attachment must be part of an item that belongs to the collective of the current user. This can be used to correct poor ocr-ed files.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
text
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Source

Get a list of sources

Return a list of all configured sources.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new source.

Create a new source. If a source with this name already exists, an error is returned.

Authorizations:
authTokenHeader
Request Body schema: application/json
required
object (Source)

Data about a Source. A source defines the endpoint where docspell receives files.

tags
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "source": {
    },
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change an existing source.

Changes an existing source. The source is looked up by its id and all properties are changed as given.

Authorizations:
authTokenHeader
Request Body schema: application/json
required
object (Source)

Data about a Source. A source defines the endpoint where docspell receives files.

tags
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "source": {
    },
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete a source.

Deletes a source. This also removes this sources from all items.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

E-Mail

Send an email.

Sends an email as specified in the body of the request.

An existing shareId must be given with the request, no matter the content of the mail.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Request Body schema: application/json
shareId
required
string <ident>
recipients
required
Array of strings
cc
required
Array of strings
bcc
required
Array of strings
subject
required
string
body
required
string

Responses

Request samples

Content type
application/json
{
  • "shareId": "string",
  • "recipients": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "subject": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

List email settings for current user.

List all available e-mail settings for the current user. E-Mail settings specify smtp connections that can be used to sent e-mails.

Multiple e-mail settings can be specified, they are distinguished by their name. The query q parameter does a simple substring search in the connection name.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create new email settings

Create new e-mail settings.

Authorizations:
authTokenHeader
Request Body schema: application/json
name
required
string <ident>
smtpHost
required
string
smtpPort
integer <int32>
smtpUser
string
smtpPassword
string <password>
from
required
string
replyTo
string
sslType
required
string
ignoreCertificates
required
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "smtpHost": "string",
  • "smtpPort": 0,
  • "smtpUser": "string",
  • "smtpPassword": "pa$$word",
  • "from": "string",
  • "replyTo": "string",
  • "sslType": "string",
  • "ignoreCertificates": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Return specific email settings by name.

Return the stored e-mail settings for the given connection name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "smtpHost": "string",
  • "smtpPort": 0,
  • "smtpUser": "string",
  • "smtpPassword": "pa$$word",
  • "from": "string",
  • "replyTo": "string",
  • "sslType": "string",
  • "ignoreCertificates": true
}

Change specific email settings.

Changes all settings for the connection with the given name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Request Body schema: application/json
name
required
string <ident>
smtpHost
required
string
smtpPort
integer <int32>
smtpUser
string
smtpPassword
string <password>
from
required
string
replyTo
string
sslType
required
string
ignoreCertificates
required
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "smtpHost": "string",
  • "smtpPort": 0,
  • "smtpUser": "string",
  • "smtpPassword": "pa$$word",
  • "from": "string",
  • "replyTo": "string",
  • "sslType": "string",
  • "ignoreCertificates": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete e-mail settings.

Deletes the e-mail settings with the specified name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

List email settings for current user.

List all available e-mail settings for the current user. E-Mail settings specify imap connections that can be used to retrieve e-mails.

Multiple e-mail settings can be specified, they are distinguished by their name. The query q parameter does a simple substring search in the connection name.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create new email settings

Create new e-mail settings.

Authorizations:
authTokenHeader
Request Body schema: application/json
name
required
string <ident>
imapHost
required
string
imapPort
integer <int32>
imapUser
string
imapPassword
string <password>
sslType
required
string
ignoreCertificates
required
boolean
useOAuth
required
boolean

Use the password as an OAuth2 access token with the authentication scheme XOAUTH2.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "imapHost": "string",
  • "imapPort": 0,
  • "imapUser": "string",
  • "imapPassword": "pa$$word",
  • "sslType": "string",
  • "ignoreCertificates": true,
  • "useOAuth": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Return specific email settings by name.

Return the stored e-mail settings for the given connection name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "imapHost": "string",
  • "imapPort": 0,
  • "imapUser": "string",
  • "imapPassword": "pa$$word",
  • "sslType": "string",
  • "ignoreCertificates": true,
  • "useOAuth": true
}

Change specific email settings.

Changes all settings for the connection with the given name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Request Body schema: application/json
name
required
string <ident>
imapHost
required
string
imapPort
integer <int32>
imapUser
string
imapPassword
string <password>
sslType
required
string
ignoreCertificates
required
boolean
useOAuth
required
boolean

Use the password as an OAuth2 access token with the authentication scheme XOAUTH2.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "imapHost": "string",
  • "imapPort": 0,
  • "imapUser": "string",
  • "imapPassword": "pa$$word",
  • "sslType": "string",
  • "ignoreCertificates": true,
  • "useOAuth": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete e-mail settings.

Deletes the e-mail settings with the specified name.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Send an email.

Sends an email as specified in the body of the request.

The item's attachment are added to the mail if requested.

Authorizations:
authTokenHeader
path Parameters
name
required
string

An e-mail connection name

id
required
string

An identifier

Request Body schema: application/json
recipients
required
Array of strings
cc
required
Array of strings
bcc
required
Array of strings
subject
required
string
body
required
string
addAllAttachments
required
boolean
attachmentIds
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "subject": "string",
  • "body": "string",
  • "addAllAttachments": true,
  • "attachmentIds": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get sent mail related to an item

Return all mails that have been sent related to the item with id id.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get sent single mail related to an item

Return one mail with the given id.

Authorizations:
authTokenHeader
path Parameters
mailId
required
string

The id of a sent mail.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "sender": "string",
  • "connection": "string",
  • "recipients": [
    ],
  • "subject": "string",
  • "body": "string",
  • "created": 0
}

Delete a sent mail.

Delete a sent mail.

Authorizations:
authTokenHeader
path Parameters
mailId
required
string

The id of a sent mail.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Search for items.

Search for items given a search query. The results are grouped by month and are sorted by item date (newest first). Tags and attachments are not resolved. The results will always contain an empty list for item tags and attachments. Set withDetails to true for retrieving all tags and a list of attachments of an item.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

limit
integer <int32>

A limit for a search query

offset
integer <int32>

A offset into the results for a search query

withDetails
boolean

Whether to return details to each item.

searchMode
string <searchmode>

Specify whether the search query should apply to soft-deleted items or not.

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ],
  • "limit": 0,
  • "offset": 0,
  • "limitCapped": true
}

Search for items.

Search for items given a search query. The results are grouped by month and are sorted by item date (newest first). Tags and attachments are not resolved. The results will always contain an empty list for item tags and attachments. Use withDetails to also retrieve all tags and a list of attachments of an item.

Authorizations:
authTokenHeader
Request Body schema: application/json
offset
integer <int32>
limit
integer <int32>

The maximum number of results to return. Note that this limit is a soft limit, there is some hard limit on the server, too.

withDetails
boolean
Default: false
searchMode
string <searchmode>
Default: "normal"
Enum: "normal" "trashed" "all"

Specify whether the search query should apply to soft-deleted items or not.

query
required
string

A query searching the contents of documents.

Responses

Request samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "withDetails": false,
  • "searchMode": "normal",
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "groups": [
    ],
  • "limit": 0,
  • "offset": 0,
  • "limitCapped": true
}

Get basic statistics about search results.

Instead of returning the results of a query, uses it to return a summary.

Authorizations:
authTokenHeader
Request Body schema: application/json
offset
integer <int32>
limit
integer <int32>

The maximum number of results to return. Note that this limit is a soft limit, there is some hard limit on the server, too.

withDetails
boolean
Default: false
searchMode
string <searchmode>
Default: "normal"
Enum: "normal" "trashed" "all"

Specify whether the search query should apply to soft-deleted items or not.

query
required
string

A query searching the contents of documents.

Responses

Request samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "withDetails": false,
  • "searchMode": "normal",
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "tagCloud": {
    },
  • "tagCategoryCloud": {
    },
  • "fieldStats": [
    ],
  • "folderStats": [
    ],
  • "corrOrgStats": [
    ],
  • "corrPersStats": [
    ],
  • "concPersStats": [
    ],
  • "concEquipStats": [
    ]
}

Get basic statistics about search results.

Instead of returning the results of a query, uses it to return a summary.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

searchMode
string <searchmode>

Specify whether the search query should apply to soft-deleted items or not.

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "tagCloud": {
    },
  • "tagCategoryCloud": {
    },
  • "fieldStats": [
    ],
  • "folderStats": [
    ],
  • "corrOrgStats": [
    ],
  • "corrPersStats": [
    ],
  • "concPersStats": [
    ],
  • "concEquipStats": [
    ]
}

Item

Get details about an item.

Get detailed information about an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "direction": "incoming",
  • "name": "string",
  • "source": "string",
  • "state": "string",
  • "created": 0,
  • "updated": 0,
  • "itemDate": 0,
  • "corrOrg": {
    },
  • "corrPerson": {
    },
  • "concPerson": {
    },
  • "concEquipment": {
    },
  • "folder": {
    },
  • "dueDate": 0,
  • "notes": "string",
  • "attachments": [
    ],
  • "sources": [
    ],
  • "archives": [
    ],
  • "tags": [
    ],
  • "customfields": [
    ],
  • "relatedItems": [
    ]
}

Delete an item.

Delete an item and all its data. This is a "soft delete", the item is still in the database and can be undeleted. A periodic job will eventually remove this item from the database.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Restore a deleted item.

A deleted item can be restored as long it is still in the database. This action sets the item state to created.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set new set of tags.

Update the tags associated to an item. This will remove all existing ones and sets the given tags, such that after this returns, the item has exactly the tags as given.

Tags may be specified as names or ids.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
items
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Add a new tag to an item.

Creates a new tag and associates it to the given item.

The tag's id and created are generated and not used from the given data, so it can be left empty. Only name and category are used, where category is optional.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
category
string
created
required
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "category": "string",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Toggles existing tags to an item.

Toggles all given tags of the item. The tags must exist, otherwise they are ignored. The tags may be specified as names or ids. Tags are either removed or linked from/to the item, depending on whether the item currently is tagged with the corresponding tag.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
items
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Remove tags from an item

Remove the given tags from the item. The tags can be specified via ids or names.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
items
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the direction of an item.

Update the direction of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
direction
required
string <direction>

Responses

Request samples

Content type
application/json
{
  • "direction": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set a folder for this item.

Updates the folder property for this item to "place" the item into a folder. If the request contains an empty object or an id property of null, the item is moved into the "public" or "root" folder.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
string <ident>

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the correspondent organization of an item.

Update the correspondent organization of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
string <ident>

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set a new correspondent organization of an item.

Create a new organization and update the correspondent organization of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
created
required
integer <date-time>

DateTime

shortName
string
use
required
string <orguse>
Enum: "correspondent" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "created": 0,
  • "shortName": "string",
  • "use": "correspondent"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the correspondent person of an item.

Update the correspondent person of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
string <ident>

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Create and set the correspondent person of an item.

Creates a new person and updates the correspondent person of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
object (IdName)

The identifier and a human readable name of some entity.

required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
use
required
string <personuse>
Enum: "concerning" "correspondent" "both" "disabled"

Whether this person should be used to create suggestions for the "concerning person", "correspondent" or both.

created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "organization": {
    },
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "use": "concerning",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the concerning person of an item.

Update the concerning person of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
string <ident>

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Create and set the concerning person of an item.

Creates a new person and updates the concerning person of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
object (IdName)

The identifier and a human readable name of some entity.

required
object (Address)

Postal address information.

required
Array of objects (Contact)
notes
string
use
required
string <personuse>
Enum: "concerning" "correspondent" "both" "disabled"

Whether this person should be used to create suggestions for the "concerning person", "correspondent" or both.

created
required
integer <date-time>

DateTime

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "organization": {
    },
  • "address": {
    },
  • "contacts": [
    ],
  • "notes": "string",
  • "use": "concerning",
  • "created": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the concering equipment of an item.

Update the concering equipment of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
string <ident>

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Create and set a new the concering equipment of an item.

Creates a new equipment and sets it as the concering equipment of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
created
required
integer <date-time>

DateTime

notes
string
use
required
string <equipmentuse>
Enum: "concerning" "disabled"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "created": 0,
  • "notes": "string",
  • "use": "concerning"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set notes of an item.

Update the notes of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
text
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the name of an item.

Update the name of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
text
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Confirms the current meta data of an item.

An item is initially in state "created". The user can confirm the associated data to put it in state "confirmed".

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Puts an item back to created state.

If an item is confirmed it can be set back to created to appear as new.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets the item date.

Sets the date of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
date
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "date": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets the items due date.

Sets the due date of an item.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
date
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "date": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get a list of proposals for this item.

During text processing, a list of possible meta data has been extracted from each attachment that may be a match to this item. This is returned here, without duplicates.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "corrOrg": [
    ],
  • "corrPerson": [
    ],
  • "concPerson": [
    ],
  • "concEquipment": [
    ],
  • "itemDate": [
    ],
  • "dueDate": [
    ]
}

Set the value of a custom field.

Sets the value for a custom field to this item. If a value already exists, it is overwritten. A value must comply to the type of the associated field. It must not be the empty string.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
field
required
string <ident>
value
required
string

Responses

Request samples

Content type
application/json
{
  • "field": "string",
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Removes the value for a custom field

Removes the value for the given custom field. The id may be the id of a custom field or its name.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

itemId
required
string

An identifier for an item

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Start reprocessing the files of the item.

This submits a job that will re-process the files (either all or the ones specified) of the item and replace their metadata.

If the item is not in "confirmed" state, its associated metada is also updated. Otherwise only the file metadata is updated (text analysis).

Authorizations:
authTokenHeader
path Parameters
itemId
required
string

An identifier for an item

Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Reorder attachments within an item

Moves the source attachment before the target attachment, such that source becomes the immediate neighbor of target with a lower position.

Authorizations:
authTokenHeader
path Parameters
itemId
required
string

An identifier for an item

Request Body schema: application/json
source
required
string <ident>
target
required
string <ident>

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "target": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Add more items as related

Add one or more items to anothers list of related items. Duplicates are ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
item
required
string <ident>
related
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "item": "string",
  • "related": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Remove items from the list of related items

Remove all given items from the list of related items

Authorizations:
authTokenHeader
Request Body schema: application/json
item
required
string <ident>
related
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "item": "string",
  • "related": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Item (Multi Edit)

Merge multiple items into one.

A list of items is merged into one item by copying all metadata into the first item in the list.

Metadata is copied into the target item, if there is no value present. So the order of items in the list matters - the first item with a correspondent or folder will win.

For metadata that allow multiple values, like tags or custom fields the values are combined. Notes are concatenated from all items and custom fields with the same name are added together for money/numeric fields, concatenated for text fields or the first value is used for other field types.

After a successful merge, the remaining items are deleted from the database (they cannot be restored).

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Delete multiple items.

Given a list of item ids, deletes all of them.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Restore multiple items.

Given a list of item ids, restores all of them.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Add tags to multiple items

Add the given tags to all given items. The tags that are currently attached to the items are not changed. If there are new tags in the given list, then they are added. Otherwise, the item is left unchanged.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
refs
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "refs": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets tags to multiple items

Sets the given tags to all given items. If the tag list is empty, then all tags are removed from the items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
refs
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "refs": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Remove tags from multiple items

Remove the given tags from all given items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
refs
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "refs": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change the name of multiple items

Sets the name of multiple items at once. The name must not be empty.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
name
required
string

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets a folder to multiple items.

Given a folder id, sets it on all given items. If the folder reference is not present, the folder is removed from all items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
ref
string <ident>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the direction of multiple items

Given multiple item ids and a direction value, sets it to all items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
direction
required
string <direction>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "direction": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the date of multiple items

Given multiple item ids and a date, sets it to all items as the item date. If no date is present, remove the date from the items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
date
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "date": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the direction of multiple items

Given multiple item ids and a date value, sets it to all items as the due date. If the date is missing, remove the due-date from the items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
date
integer <date-time>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "date": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets an organization to multiple items.

Given an organization id, sets it on all given items. If the organization is missing, the reference is removed from all items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
ref
string <ident>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets an correspondent person to multiple items.

Given an person id, sets it on all given items as correspondent person. If the person is missing, the reference is removed from all items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
ref
string <ident>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets an concerning person to multiple items.

Given an person id, sets it on all given items as concerning person. If the person is missing, it is removed from all items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
ref
string <ident>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Sets an equipment to multiple items.

Given an equipment id, sets it on all given items. If no equipment is given, the reference is removed from all given items.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
ref
string <ident>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Confirm multiple items.

Given a list of item ids, confirm all of them.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Un-confirm multiple items.

Given a list of item ids, un-confirm all of them.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Submit multiple items to re-processing

Given a list of item-ids, submits all these items for reprocessing. All attachments of these items will be reprocessed. Item metadata may be changed if an item is not confirmed. Confirmed items are not changed.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Set the value of a custom field for multiple items

Sets the value for a custom field to multiple given items. If a value already exists, it is overwritten. The value must comply to the associated field type. It must not be the empty string.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
required
object (CustomFieldValue)

Data structure to update the value of a custom field.

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "field": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Removes the value for a custom field on multiple items

Removes the value for the given custom field from multiple items. The field may be specified by its id or name.

Authorizations:
authTokenHeader
Request Body schema: application/json
items
required
Array of strings <ident> [ items <ident > ]
name
required
string

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Removes extracted text for the given attachment.

Removes any extracted text for the given attachment.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Attachment (Multi Edit)

Delete multiple attachments.

Given a list of attachment ids, deletes all of them.

Authorizations:
authTokenHeader
Request Body schema: application/json
ids
required
Array of strings <ident> [ items <ident > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Job Queue

Get complete state of job queue.

Get the current state of the job qeue. The job qeue contains all processing tasks and other long-running operations. All users/collectives share processing resources.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "progress": [
    ],
  • "completed": [
    ],
  • "queued": [
    ]
}

Cancel a job.

Tries to cancel a job and remove it from the queue. If the job is running, a cancel request is send to the corresponding joex instance. Otherwise the job is removed from the queue.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change the priority of a waiting job.

A waiting job can change its priority. If the job is not in state waiting, this operation fails.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
priority
required
string <priority>
Enum: "high" "low"

Responses

Request samples

Content type
application/json
{
  • "priority": "high"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Utility

Check a calendar event string

For ui purposes, this route checks a calendar event string and either returns the normal form or an error message.

Authorizations:
authTokenHeader
Request Body schema: application/json
event
required
string

Responses

Request samples

Content type
application/json
{
  • "event": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "event": "string",
  • "next": [
    ]
}

User Tasks

Get settings for "Notify Due Items" task

Return all current notification settings of the authenticated user. Users can be notified on due items via e-mail. This is done by periodically querying items. It is possible to have multiple tasks.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create settings for "Notify Due Items" task

Create a new notification settings task of the authenticated user. The id field in the input is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
remindDays
required
integer <int32>

Used to restrict items by their due dates. All items with a due date lower than (now + remindDays) are searched.

capOverdue
required
boolean

If this is true, the search is also restricted to due dates greater than now - remindDays'. Otherwise, due date are not restricted in that direction (only lower than now

  • remindDays' applies) and it is expected to restrict it more using custom tags.
required
Array of objects (Tag)
required
Array of objects (Tag)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "remindDays": 0,
  • "capOverdue": true,
  • "tagsInclude": [
    ],
  • "tagsExclude": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change settings for "Notify Due Items" task

Change the settings for a notify-due-items task. The task is looked up by its id.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
remindDays
required
integer <int32>

Used to restrict items by their due dates. All items with a due date lower than (now + remindDays) are searched.

capOverdue
required
boolean

If this is true, the search is also restricted to due dates greater than now - remindDays'. Otherwise, due date are not restricted in that direction (only lower than now

  • remindDays' applies) and it is expected to restrict it more using custom tags.
required
Array of objects (Tag)
required
Array of objects (Tag)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "remindDays": 0,
  • "capOverdue": true,
  • "tagsInclude": [
    ],
  • "tagsExclude": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get notify items settings for a specific task

Return the current settings for a single notify-due-items task of the authenticated user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "remindDays": 0,
  • "capOverdue": true,
  • "tagsInclude": [
    ],
  • "tagsExclude": [
    ]
}

Delete a specific notify due items task

Delete the settings to a notify-due-items task of the authenticated user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Start the "Notify Due Items" task once

Starts the notify-due-items task just once, discarding the schedule and not updating the periodic task.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
remindDays
required
integer <int32>

Used to restrict items by their due dates. All items with a due date lower than (now + remindDays) are searched.

capOverdue
required
boolean

If this is true, the search is also restricted to due dates greater than now - remindDays'. Otherwise, due date are not restricted in that direction (only lower than now

  • remindDays' applies) and it is expected to restrict it more using custom tags.
required
Array of objects (Tag)
required
Array of objects (Tag)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "remindDays": 0,
  • "capOverdue": true,
  • "tagsInclude": [
    ],
  • "tagsExclude": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get settings for PeriodicQuery task

Return all current settings of the authenticated user.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create settings for PeriodicQuery task

Create a new periodic-query task of the authenticated user. The id field in the input is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
query
string <itemquery>
bookmark
string

Name or ID of bookmark to use.

contentStart
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "query": "string",
  • "bookmark": "string",
  • "contentStart": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change settings for PeriodicQuery task

Change the settings for a periodic-query task. The task is looked up by its id.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
query
string <itemquery>
bookmark
string

Name or ID of bookmark to use.

contentStart
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "query": "string",
  • "bookmark": "string",
  • "contentStart": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get periodic query for a specific task

Return the current settings for a single periodic-query task of the authenticated user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "query": "string",
  • "bookmark": "string",
  • "contentStart": "string"
}

Delete a specific periodic-query task

Delete the settings to a periodic-query task of the authenticated user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Start the PeriodicQuery task once

Starts the periodic-query task just once, discarding the schedule and not updating the periodic task.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
Array of objects (NotificationChannelRef)
schedule
required
string <calevent>
query
string <itemquery>
bookmark
string

Name or ID of bookmark to use.

contentStart
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "channels": [
    ],
  • "schedule": "string",
  • "query": "string",
  • "bookmark": "string",
  • "contentStart": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get settings for "Scan Mailbox" task

Return the current settings for the scan-mailbox tasks of the authenticated user. Users can periodically fetch mails to be imported into docspell. It is possible to have multiple of these tasks.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create settings for "Scan Mailbox" task

Create new settings for a scan-mailbox task. The id field in the input data is ignored.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
imapConnection
required
string <ident>
folders
required
Array of strings
scanRecursively
required
boolean

Scan folders recursively for new mails.

schedule
required
string <calevent>
receivedSinceHours
integer <int32>

Look only for mails newer than `receivedSinceHours' hours.

targetFolder
string

The folder to move all mails into that have been successfully submitted to docspell.

deleteMail
required
boolean

Whether to delete all successfully imported mails. This only applies, if `targetFolder' is not set.

direction
string <direction>

The direction to apply to items resulting from importing mails. If not set, the value is guessed based on the from and to mail headers and your address book.

itemFolder
string <ident>

The folder id that is applied to items resulting from importing mails. If the folder id is not valid when the task executes, items have no folder set.

object (StringList)

A simple list of strings.

fileFilter
string <glob>

A glob to filter attachments to import by file name.

subjectFilter
string <glob>

A glob to filter attachments to import by subject.

language
string <language>

The language used for text extraction and analysis when processing mails.

postHandleAll
boolean
attachmentsOnly
boolean

Import only the attachments e-mails and discard the body

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "imapConnection": "string",
  • "folders": [
    ],
  • "scanRecursively": true,
  • "schedule": "string",
  • "receivedSinceHours": 0,
  • "targetFolder": "string",
  • "deleteMail": true,
  • "direction": "string",
  • "itemFolder": "string",
  • "tags": {
    },
  • "fileFilter": "string",
  • "subjectFilter": "string",
  • "language": "string",
  • "postHandleAll": true,
  • "attachmentsOnly": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Change settings for a "Scan Mailbox" task

Change the settings for a scan-mailbox task. The task is looked up by its id.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
imapConnection
required
string <ident>
folders
required
Array of strings
scanRecursively
required
boolean

Scan folders recursively for new mails.

schedule
required
string <calevent>
receivedSinceHours
integer <int32>

Look only for mails newer than `receivedSinceHours' hours.

targetFolder
string

The folder to move all mails into that have been successfully submitted to docspell.

deleteMail
required
boolean

Whether to delete all successfully imported mails. This only applies, if `targetFolder' is not set.

direction
string <direction>

The direction to apply to items resulting from importing mails. If not set, the value is guessed based on the from and to mail headers and your address book.

itemFolder
string <ident>

The folder id that is applied to items resulting from importing mails. If the folder id is not valid when the task executes, items have no folder set.

object (StringList)

A simple list of strings.

fileFilter
string <glob>

A glob to filter attachments to import by file name.

subjectFilter
string <glob>

A glob to filter attachments to import by subject.

language
string <language>

The language used for text extraction and analysis when processing mails.

postHandleAll
boolean
attachmentsOnly
boolean

Import only the attachments e-mails and discard the body

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "imapConnection": "string",
  • "folders": [
    ],
  • "scanRecursively": true,
  • "schedule": "string",
  • "receivedSinceHours": 0,
  • "targetFolder": "string",
  • "deleteMail": true,
  • "direction": "string",
  • "itemFolder": "string",
  • "tags": {
    },
  • "fileFilter": "string",
  • "subjectFilter": "string",
  • "language": "string",
  • "postHandleAll": true,
  • "attachmentsOnly": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get settings for "Scan Mailbox" task

Return the current settings for a single scan-mailbox task of the authenticated user. Users can periodically fetch mails to be imported into docspell.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "imapConnection": "string",
  • "folders": [
    ],
  • "scanRecursively": true,
  • "schedule": "string",
  • "receivedSinceHours": 0,
  • "targetFolder": "string",
  • "deleteMail": true,
  • "direction": "string",
  • "itemFolder": "string",
  • "tags": {
    },
  • "fileFilter": "string",
  • "subjectFilter": "string",
  • "language": "string",
  • "postHandleAll": true,
  • "attachmentsOnly": true
}

Delete a scan-mailbox task.

Deletes the settings to a scan-mailbox task of the authenticated user.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Start the "Scan Mailbox" task once

Starts the scan-mailbox task just once, discarding the schedule and not updating the periodic task.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
enabled
required
boolean
summary
string
imapConnection
required
string <ident>
folders
required
Array of strings
scanRecursively
required
boolean

Scan folders recursively for new mails.

schedule
required
string <calevent>
receivedSinceHours
integer <int32>

Look only for mails newer than `receivedSinceHours' hours.

targetFolder
string

The folder to move all mails into that have been successfully submitted to docspell.

deleteMail
required
boolean

Whether to delete all successfully imported mails. This only applies, if `targetFolder' is not set.

direction
string <direction>

The direction to apply to items resulting from importing mails. If not set, the value is guessed based on the from and to mail headers and your address book.

itemFolder
string <ident>

The folder id that is applied to items resulting from importing mails. If the folder id is not valid when the task executes, items have no folder set.

object (StringList)

A simple list of strings.

fileFilter
string <glob>

A glob to filter attachments to import by file name.

subjectFilter
string <glob>

A glob to filter attachments to import by subject.

language
string <language>

The language used for text extraction and analysis when processing mails.

postHandleAll
boolean
attachmentsOnly
boolean

Import only the attachments e-mails and discard the body

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "enabled": true,
  • "summary": "string",
  • "imapConnection": "string",
  • "folders": [
    ],
  • "scanRecursively": true,
  • "schedule": "string",
  • "receivedSinceHours": 0,
  • "targetFolder": "string",
  • "deleteMail": true,
  • "direction": "string",
  • "itemFolder": "string",
  • "tags": {
    },
  • "fileFilter": "string",
  • "subjectFilter": "string",
  • "language": "string",
  • "postHandleAll": true,
  • "attachmentsOnly": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Custom Fields

Get all defined custom fields.

Get all custom fields defined for the current collective. The sort parameter can be used to control the order of the returned list. It can take a value from: name, -name, label, -label, type, -type.

Authorizations:
authTokenHeader
query Parameters
q
string

A query string.

sort
string

How to sort the returned list

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Create a new custom field

Creates a new custom field.

Authorizations:
authTokenHeader
Request Body schema: application/json
name
required
string <ident>
label
string
ftype
required
string <customfieldtype>
Enum: "text" "numeric" "date" "bool" "money"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "label": "string",
  • "ftype": "text"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get details about a custom field.

Returns the details about a custom field.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "label": "string",
  • "ftype": "text",
  • "usages": 0,
  • "created": 0
}

Change a custom field

Change properties of a custom field.

Changing the label has no further impliciations, since it is only used for displaying. The name and type on the other hand have consequences: name must be unique and the type determines how the value is stored internally.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
name
required
string <ident>
label
string
ftype
required
string <customfieldtype>
Enum: "text" "numeric" "date" "bool" "money"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "label": "string",
  • "ftype": "text"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Deletes a custom field.

Deletes the custom field and all its relations.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Addons

Get all registered addons

Returns a list of all registered addons.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Install a new addon

Given an URL to an addon (which is a zip file containing a docspell-meta.yaml or json descriptor), the addon is downloaded and installed in docspell.

By default this happens asynchronously and the response only indicates that installing has been submitted. The result will be transfered over the websocket channel. With query parameter sync installing happens synchronously and it may take a while to complete (if successful, the addon id is returned).

Authorizations:
authTokenHeader
query Parameters
sync
boolean
Request Body schema: application/json
url
required
string <uri>

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "id": "string"
}

Deletes the addon and removes it from all addon run configs

Deletes the addon from the database and also removes it from all run configurations where it might be referenced.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Update an addon from its url

Addons are urls to zip files. This call reads the url again and updates the contents in docspell for this addon.

By default this happens asynchronously and the response only indicates that updating has been submitted. The result will be transfered over the websocket channel. With query parameter sync updating happens synchronously and it may take a while to complete.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

query Parameters
sync
boolean

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Get all addon run configs

Returns a list of addon run configs.

Authorizations:
authTokenHeader

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Adds a new addon run config

Adds a new set of configured addons, creating a run configuration.

Authorizations:
authTokenHeader
Request Body schema: application/json
id
required
string <ident>
name
required
string
enabled
required
boolean
userId
string <ident>

An addon can be run on behalf of a user. If not given, no authentication token is generated into the environment of the addon. The user can be given as user_id or by its login name.

schedule
string <calevent>

A schedule must be supplied when a trigger type of 'scheduled' is defined.

trigger
required
Array of strings <addon-trigger-type> [ items <addon-trigger-type > ]
Items Enum: "process-item" "reprocess-item" "scheduled"

Defines when this task is executed. There must be at least one element. Possible values:

  • process-item: After an item has been processed
  • reprocess-item: After an item has been re-processed
  • scheduled: Executed periodically based on a schedule, which must be defined then
required
Array of objects (AddonRef)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": true,
  • "userId": "string",
  • "schedule": "string",
  • "trigger": [
    ],
  • "addons": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "id": "string"
}

Updates an addon run config

Updates an existing addon run configuration. The id is taken from the URL and any given id in the request body is ignored.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Request Body schema: application/json
id
required
string <ident>
name
required
string
enabled
required
boolean
userId
string <ident>

An addon can be run on behalf of a user. If not given, no authentication token is generated into the environment of the addon. The user can be given as user_id or by its login name.

schedule
string <calevent>

A schedule must be supplied when a trigger type of 'scheduled' is defined.

trigger
required
Array of strings <addon-trigger-type> [ items <addon-trigger-type > ]
Items Enum: "process-item" "reprocess-item" "scheduled"

Defines when this task is executed. There must be at least one element. Possible values:

  • process-item: After an item has been processed
  • reprocess-item: After an item has been re-processed
  • scheduled: Executed periodically based on a schedule, which must be defined then
required
Array of objects (AddonRef)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": true,
  • "userId": "string",
  • "schedule": "string",
  • "trigger": [
    ],
  • "addons": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Deletes the addon run config given its id

Deletes the addon run configuration.

Authorizations:
authTokenHeader
path Parameters
id
required
string

An identifier

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Submits a task running addons for an item

Submits a background task that executes the specified (or all) addons configured to use for an existing item.

Authorizations:
authTokenHeader
Request Body schema: application/json
itemId
required
string <ident>
additionalItems
Array of strings <ident> [ items <ident > ]

Additional items to run addons on. There will be one job submitted per item.

addonRunConfigIds
Array of strings <ident> [ items <ident > ]

If non empty, only select these addon run configs. Otherwise all configured to be run for existing items are executed.

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "additionalItems": [
    ],
  • "addonRunConfigIds": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}