Skip to main content
POST
/
admin
/
uploads
Get Upload URL
curl --request POST \
  --url https://api.headlesscommerce.io/v1/admin/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "content_type": "<string>",
  "content_length": 123
}
'
{
  "upload_url": "<string>",
  "public_url": "<string>",
  "expires_in": 123
}

Authorizations

Authorization
string
header
required

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

Body

application/json
filename
string
required
content_type
string
required
content_length
integer

Response

200 - application/json

Success

upload_url
string

S3 Presigned Upload URL

public_url
string

URL accessible after upload completion

expires_in
integer

URL expiration time (seconds)