Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

Documents — API reference

The account's stored documents (uploads, attachments, scans), malware-scanned before they are served.

← All groups
GET /api/v1/documents

Stored documents

Scope: documents:read · paginated · documents.index

ParameterInTypeDescription
qquerystringSearch title or filename
sourcequerystringFilter by source (api, email, scanner …)
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

documents * [StoredDocument]
fields

StoredDocument

classification string | null
content_type string | null
filename string
id * string (uuid)
inserted_at string (date-time)
sha256 string
size integer
source string
title string | null
has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/documents

Store a document

Multipart `file`, or JSON `{filename, content_type, data_base64}`.

Scope: documents:write · Idempotency-Key · documents.create

Request body multipart/form-data
content_type string JSON uploads
data_base64 string JSON uploads: the content, base64
file string The file (multipart)
filename string JSON uploads
title string
Responses 201 · 401 · 402 · 403 · 409 · 422 · 429 · 507

201 Success

document * StoredDocument
fields

StoredDocument

classification string | null
content_type string | null
filename string
id * string (uuid)
inserted_at string (date-time)
sha256 string
size integer
source string
title string | null

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

507 Storage full

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
DELETE /api/v1/documents/{id}

Delete a document

Deletes one of the documents the person can reach. A document under a legal hold stays (409 `legal_hold`); one the person may not delete answers 403 `forbidden`.

Scope: documents:write · documents.delete

ParameterInTypeDescription
id *pathstring (uuid)
Responses 204 · 401 · 402 · 403 · 404 · 409 · 422 · 429

204 Done (no content)

401 Problem details (401)

402 Problem details (402)

403 `forbidden`: you can't delete this document

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

404 No such document

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

409 `legal_hold`: under a legal hold, so it stays

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/documents/{id}

One document (with its text), or its bytes

Answers the document with up to 20,000 characters of extracted text; with `download` present, streams the bytes instead.

Scope: documents:read · documents.show

ParameterInTypeDescription
id *pathstring (uuid)
downloadquerystringPresent (any value): stream the file
Responses 200 · 401 · 403 · 404 · 409 · 429 · 502

200 Success

document * object
fields
classification string | null
content_type string | null
filename string
id * string (uuid)
inserted_at string (date-time)
sha256 string
size integer
source string
text string | null Extracted text (first 20,000 characters)
title string | null

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

409 Still being scanned for malware (download)

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

502 Storage unavailable

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
GET /api/v1/documents/{id}/download_url

A 5-minute download URL

Issued after the same checks as a download; a relative URL (development's local disk) is on this host.

Scope: documents:read · documents.download_url

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 403 · 404 · 409 · 429 · 502

200 Success

expires_in * integer Seconds (300)
url * string

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

409 Still being scanned for malware

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

502 Storage unavailable

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)