DevelopersYour tokens
Reference

Uploads

A large file in parts, straight to storage, the way the browser sends anything past the plain upload limit and every archive.

#

Start an upload in parts

POSTapi.thawed.app/v1/uploads

For a file past the plain limit, or any archive. Answers with the key, the upload id, the size of a part and how many parts the file takes; then /uploads/urls hands out a URL per part to PUT to, and /uploads/complete makes the document (or the import, for an archive). The family or business that started an upload is the only one that can finish it.

BodyJSON
namestringrequired
sizeintegerrequired
mimestring
Responses
200
Where to put the parts.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
422
A field was wrong. errors names each one.
200 answer
keystring
upload_idstring
part_bytesinteger
partsinteger
Request
curl -X POST "https://api.thawed.app/v1/uploads" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Marisol Alvarez","size":48213977,"mime":"application/pdf"}'
Body
{
  "name": "Marisol Alvarez",
  "size": 48213977,
  "mime": "application/pdf"
}
Response 200
{
  "key": "staging/019958a0-2d5f…/scan.pdf",
  "upload_id": "2~a7KxQm9…",
  "part_bytes": 67108864,
  "parts": 1
}
#

URLs for the next parts

POSTapi.thawed.app/v1/uploads/urls

Up to twenty part numbers at a time; each URL takes one PUT of that part's bytes and answers with an ETag to keep.

BodyJSON
keystringrequired
upload_idstringrequired
partsarray of integerrequired
Responses
200
One URL per part, keyed by part number.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
422
A field was wrong. errors names each one.
200 answer
urlsobject
Request
curl -X POST "https://api.thawed.app/v1/uploads/urls" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key":"staging/019958a0-2d5f…/scan.pdf","upload_id":"2~a7KxQm9…","parts":[1]}'
Body
{
  "key": "staging/019958a0-2d5f…/scan.pdf",
  "upload_id": "2~a7KxQm9…",
  "parts": [
    1
  ]
}
Response 200
{
  "urls": {
    "1": "string"
  }
}
#

Finish an upload

POSTapi.thawed.app/v1/uploads/complete

Every part's number and ETag. A document is copied in, sealed and read; a .zip or .enex becomes an import, and the answer names it.

BodyJSON
keystringrequired
upload_idstringrequired
namestringrequired
mimestring
partsarray of objectrequired
numberintegerrequired
etagstringrequired
Responses
200
Done. import_id is set when the file was an archive.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
422
A field was wrong. errors names each one.
200 answer
import_idstring or null
redirectstring or null
Request
curl -X POST "https://api.thawed.app/v1/uploads/complete" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key":"staging/019958a0-2d5f…/scan.pdf","upload_id":"2~a7KxQm9…","name":"Marisol Alvarez","mime":"application/pdf","parts":[{"number":129.5,"etag":"\"9b2f3f0c2a6e8d11\""}]}'
Body
{
  "key": "staging/019958a0-2d5f…/scan.pdf",
  "upload_id": "2~a7KxQm9…",
  "name": "Marisol Alvarez",
  "mime": "application/pdf",
  "parts": [
    {
      "number": 129.5,
      "etag": "\"9b2f3f0c2a6e8d11\""
    }
  ]
}
Response 200
{
  "import_id": "019958a0-4f71-706d-8e52-6c3f5d91b044",
  "redirect": "https://go.thawed.app/documents/019958a0-1c4e-7d3a-9b2f-3f0c2a6e8d11"
}
#

Abandon an upload

POSTapi.thawed.app/v1/uploads/abort

Give up on an upload started with POST /uploads: the parts sent so far are discarded and nothing is filed. Only the family or business that started it can abandon it.

BodyJSON
keystringrequired
upload_idstringrequired
Responses
200
Done.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
422
A field was wrong. errors names each one.
200 answer
okboolean
Request
curl -X POST "https://api.thawed.app/v1/uploads/abort" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key":"staging/019958a0-2d5f…/scan.pdf","upload_id":"2~a7KxQm9…"}'
Body
{
  "key": "staging/019958a0-2d5f…/scan.pdf",
  "upload_id": "2~a7KxQm9…"
}
Response 200
{
  "ok": true
}