Files

POST /files/upload-url

Get a short-lived URL to upload a file to. PUT the file's bytes to uploadUrl, then pass the returned key to whichever endpoint consumes the file, such as brand assets or import jobs.

Requires the settings:write permission.

Body parameters

fileNamestringrequired

The file's name, including its extension.

accesspublic | privaterequired

Whether the uploaded file is served from a public URL or kept private and reachable only through signed links.

sizeBytesinteger

Size of the file in bytes, if you know it up front.

contentTypestring

The file's MIME type, such as image/jpeg. The upload is stored and served as this type, whatever the upload request itself says. A file that is not an image or a video is served as a download.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/files/upload-url" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileName": "string",
  "access": "public",
  "sizeBytes": 0,
  "contentType": "string"
}'
Response
{
  "key": "string",
  "uploadUrl": "https://example.com",
  "expiresAt": "2025-01-15T09:30:00Z"
}