Skip to main content
POST
/
v1
/
uploads
Initiate a file upload
curl --request POST \
  --url https://files.adclear.ai/v1/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fileName": "<string>",
  "fileSize": 123,
  "contentType": "<string>"
}
'
{
  "uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "uploadUrl": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Clerk session JWT or Unkey API key passed as Bearer token

Body

application/json
fileName
string
required

Original file name

Minimum string length: 1
fileSize
integer
required

File size in bytes

contentType
string
required

MIME type (e.g. application/pdf, image/png)

Minimum string length: 1

Response

Upload initiated — use uploadUrl to PUT the file

uploadId
string<uuid>
required

Server-generated upload identifier

uploadUrl
string<uri>
required

GCS signed URL — PUT your file here with the correct Content-Type

expiresAt
string<date-time>
required

ISO 8601 timestamp when the signed URL expires