Skip to main content
POST
/
uploads
Presign a direct-to-storage upload
curl --request POST \
  --url http://localhost:3001/api/v1/uploads \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "filename": "logo.png",
  "contentType": "image/png"
}
'
{
  "data": {
    "uploadId": "5c1e8b34-2a9f-4d61-8e07-3b2c1a0f9d4e",
    "uploadUrl": "https://storage.example.com/dafty/uploads/usr_8a2f3c/5c1e8b34?signature=…",
    "expiresIn": 3600
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
filename
string
required
Required string length: 1 - 255
contentType
enum<string>
required
Available options:
image/png,
image/jpeg,
image/gif,
image/webp

Response

Created

data
object
required