Skip to main content
POST
/
api
/
shelves
Create a shelf
curl --request POST \
  --url https://api.shelv.dev/api/shelves \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'name=<string>' \
  --form review=true \
  --form template=book
{
  "createdAt": "2023-11-07T05:31:56Z",
  "errorMessage": "<string>",
  "failedAtStep": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mimeType": "<string>",
  "name": "<string>",
  "originalFileName": "<string>",
  "pageCount": 123,
  "reviewMode": true,
  "s3Prefix": "<string>",
  "status": "uploading",
  "storageSizeBytes": 123,
  "template": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "userId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

PDF file to process (max 300 MB)

name
string

Display name for the shelf

review
enum<string>

Whether to pause in review state before finalizing

Available options:
true,
false
template
enum<string>

Template to apply for structuring

Available options:
book,
legal-contract,
academic-paper

Response

Shelf created, processing started

createdAt
string<date-time>
required
errorMessage
string | null
required
failedAtStep
string | null
required
id
string<uuid>
required
mimeType
string
required
name
string
required
originalFileName
string
required
pageCount
number | null
required
reviewMode
boolean
required
s3Prefix
string
required
status
enum<string>
required
Available options:
uploading,
parsing,
structuring,
verifying,
review,
ready,
failed
storageSizeBytes
number | null
required
template
string | null
required
updatedAt
string<date-time>
required
userId
string
required