SDK API
Getting Started
When requesting the api, include the Authorization
header like below:
Authorization: {API_KEY}
To find your API_KEY
, see Authentication (opens in a new tab).
Endpoints
POST
/api/buckets/{bucket_id}/upload
Generate a presigned upload URL.
Body Params (* required):
fileKey: string, *
fileSize: number,
fileType: mime (string, e.g. image/* or image/pdf),
metadata: any,
slug: string *
DELETE
/api/buckets/{bucket_id}/files
Delete a file from the Key, always returns 200 even if file doesn't exist.
Body Params (* required):
fileKey: string *
PATCH
/api/buckets/{bucket_id}/info
Update a bucket's info (such as name, description, and color)
Body Params (* required):
name: string, *
description: string, *
color: 'green'|'blue'|'red'|'black'|'purple'
GET
/api/buckets/{bucket_id}/usage
Get the current storage and request usage for the month, cached for 10 minutes.
Does not work for BYOB.
GET
/api/buckets/{bucket_id}/files
Get the first 500 files in the bucket, cached for 5 minutes.