Documents

Searching and listing documents, one document, its file and thumbnail, editing, bulk changes, reprocessing, locked PDFs, sharing links, and saved views.

MethodPathSummary
GET/api/meWho you are: the signed-in person and what they can do here
GET/api/documentsSearch and list documents
GET/api/documents/:idGet a document
PATCH/api/documents/:idUpdate a document
DELETE/api/documents/:idDelete a document
POST/api/documents/bulkChange many documents at once
POST/api/documents/:id/reprocessRead a document's text again
GET/api/documents/:id/fileThe file itself, streamed from Drive (Range passed on, for PDF.js)
POST/api/documents/:id/unlockUnlock a password-protected PDF
GET/api/documents/:id/thumbA document's thumbnail
GET/api/documents/:id/sharingSharing is Drive's: links (with expiry, password, download switch) and people/groups
POST/api/documents/:id/linksCreate a share link
DELETE/api/documents/:id/links/:lidDelete a share link
POST/api/uploadAdd a document
POST/api/viewsSave a view (filters)
DELETE/api/views/:idDelete a saved view

#Who you are: the signed-in person and what they can do here

GET/api/me
Address
https://<your-org>.brambleit.cloud/paper/api/me
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Response 200

FieldTypeDescription
userobject
user.idinteger
user.namestring
user.first_namestring
user.emailstring
cabinetsarray of any
tagsarray of any
correspondentsarray of any
doctypesarray of any
inboxany
lockedany
viewsarray of object
views[].idinteger, or null
views[].namestring
views[].filtersarray of any
Example response
JSON
{
  "user": {
    "id": 42,
    "name": "Example name",
    "first_name": "Alex",
    "email": "alex@example.com"
  },
  "cabinets": [],
  "tags": [],
  "correspondents": [],
  "doctypes": [],
  "inbox": null,
  "locked": null,
  "views": [
    {
      "id": 42,
      "name": "Example name",
      "filters": []
    }
  ]
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/me', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Search and list documents

GET/api/documents
Address
https://<your-org>.brambleit.cloud/paper/api/documents
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Query parameters

NameTypeDescription
sortstringSort order (e.g. date, added, title).
limitnumberHow many.
offsetnumberWhere to start.

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Get a document

GET/api/documents/:id
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Update a document

PATCH/api/documents/:id
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
titlestringIts title.
datestring (date)Its date.
correspondent_idintegerWho it's from.
doctype_idintegerWhat kind of document it is.
notesstringNotes (stored encrypted).
asnstringArchive serial number.
tag_idsarray of anyIts tags.

Response 200

Errors

StatusMessage
400Give the document a title
400That isn’t a date
400The archive number must be a whole number

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42', {
  method: 'PATCH',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"title":"Example title","date":"2026-11-12","correspondent_id":7,"doctype_id":7,"notes":"string","asn":"string","tag_ids":[]}),
});
const data = await res.json();

#Delete a document

DELETE/api/documents/:id
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#Change many documents at once

POST/api/documents/bulk
Address
https://<your-org>.brambleit.cloud/paper/api/documents/bulk
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Request body JSON

NameTypeDescription
allany
filtersarray of any
idsarray of anyThe documents (or all with filters).
opstringadd_tags, remove_tags, set_correspondent, set_doctype, checked, reprocess or delete.
valueanyThe tags, correspondent or type to set.

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/bulk', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"all":"…","filters":[],"ids":[],"op":"string","value":"…"}),
});
const data = await res.json();

#Read a document's text again

POST/api/documents/:id/reprocess
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/reprocess
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/12.5/reprocess', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#The file itself, streamed from Drive (Range passed on, for PDF.js)

GET/api/documents/:id/file

The file itself, streamed from Drive (Range passed on, for PDF.js). The document as a PDF: Paper's PDF copy when there is one (photos, scans, text, unlocked PDFs), otherwise the file itself. ?original=1 always gives the file as it was added. ?download=1 saves rather than opens.

Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/file
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Query parameters

NameTypeDescription
originalany
downloadany

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42/file', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Unlock a password-protected PDF

POST/api/documents/:id/unlock

A locked PDF: try a password now. { password, remember } — remember keeps it for the cabinet, and every other locked PDF there gets another go.

Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/unlock
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
passwordanyThe PDF's password.
rememberanySave the password for this cabinet.
labelstringA name for the saved password.

Response 200

FieldTypeDescription
okboolean
retriedany
Example response
JSON
{
  "ok": true,
  "retried": null
}

Errors

StatusMessage
400Enter the password
400That password didn’t open it

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42/unlock', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"password":"…","remember":"…","label":"Example label"}),
});
const data = await res.json();

#A document's thumbnail

GET/api/documents/:id/thumb
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/thumb
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Response

An empty body, a body.

Errors

StatusMessage
404No preview

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42/thumb', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Sharing is Drive's: links (with expiry, password, download switch) and people/groups

GET/api/documents/:id/sharing
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/sharing
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42/sharing', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Create a share link

POST/api/documents/:id/links
Address
https://<your-org>.brambleit.cloud/paper/api/documents/:id/links
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
expires_daysinteger
passwordany
allow_downloadboolean

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/documents/42/links', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"expires_days":1,"password":"…","allow_download":false}),
});
const data = await res.json();

#Add a document

POST/api/upload

The request body is the file's bytes.

Address
https://<your-org>.brambleit.cloud/paper/api/upload
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Query parameters

NameTypeDescription
cabinetanyThe cabinet.
namestringThe file name.

Response duplicate ? 200 : 201

FieldTypeDescription
duplicateany
Example response
JSON
{
  "…await documents.get(req.": "…",
  "duplicate": null
}

Errors

StatusMessage
411Content-Length is required
413Files can be up to 500 MB
400The file needs a name

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/upload', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Save a view (filters)

POST/api/views
Address
https://<your-org>.brambleit.cloud/paper/api/views
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Request body JSON

NameTypeDescription
namestring
filtersarray of any

Response 201

FieldTypeDescription
idinteger
Example response
JSON
{
  "id": 42
}

Errors

StatusMessage
400Give the view a name

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/views', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"Example name","filters":[]}),
});
const data = await res.json();

#Delete a saved view

DELETE/api/views/:id
Address
https://<your-org>.brambleit.cloud/paper/api/views/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/views/12.5', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();