Skip to content

Create a presigned upload

POST/v1/uploads
Authorization
AuthorizationBearer token (OAuth access token or teakapi_ API key) · headerrequired

Bearer token. Accepts either an OAuth 2.0 access token (obtained via browser sign-in; expires after 1 hour and is refreshable) or a teakapi_ API key.

Request body
application/json
fileNamestringrequired
fileSizenumberrequired
mimeTypestringrequired
Responses
200

Prepared direct file upload

expiresInnumberrequired
fileKeystringrequired
maxFileSizenumberrequired
methodstringrequired
Allowed:PUT
uploadUrlstring<uri>required
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://teakvault.com/api/v1/uploads' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "fileName": "string",
  "fileSize": 0,
  "mimeType": "string"
}'
Response
{
  "expiresIn": 0,
  "fileKey": "string",
  "maxFileSize": 0,
  "method": "PUT",
  "uploadUrl": "http://example.com"
}

Was this page helpful?