Documents

Get an upload target, or register an uploaded document

Requires the documents scope. Two calls, as in the app:

  1. Send {filename, content_type, size_bytes, designation?}. The answer (201, document_upload) holds a short-lived upload target: send the file's bytes with upload.method to upload.url with exactly upload.headers (or, with the @vercel/blob client, put(pathname, file, {access: "private", token: client_token})). The target is good for 15 minutes, for one file at one path, of the declared type, up to 20 MB. The bytes go straight to the document store and never through this API.
  2. Send {upload_id}. The server checks what the store holds at that path (size and type, never the caller's word) and registers the document (201, document). Registering the same upload again answers 200 with the same document.

content_type must be one the app accepts: PDF, Word (.docx), plain text, Markdown, PNG, JPEG, GIF, WebP, zip, or a dataset (CSV, TSV, Excel). designation is public, confidential (the default) or aeo.

post/matters/{id}/documents

Request

  • Base URL: https://api.suprememind.ai/v1
  • URL: https://api.suprememind.ai/v1/matters/{id}/documents
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Makes a POST safe to retry for 24 hours.

Request body

OR

Example request

{
  "content_type": "application/pdf"
}

Response

This upload was already registered; the same document.

idinteger required
object'document' required
matter_idstring required
filenamestring required
content_typestring nullable
size_bytesinteger nullable
designation'public' | 'confidential' | 'aeo' required
include_in_analysisboolean
created_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.