Generate a presigned upload URL
Returns a presigned S3 POST policy that lets you upload a single file directly to kelviq’s storage bucket (max 5 GB, expires in 1 hour). Use the returned fileKey as the value of imageKeys / fileKeys on the catalog product/plan endpoints.
Upload flow:
POST /media/withfileNameandfileType.- Build a
multipart/form-datarequest and send every key/value fromfieldsas a form field, plus a finalfilefield containing the binary. POSTthat form to the returnedurl. A204 No Contentresponse means the upload succeeded.- Pass
fileKeyto the relevant catalog endpoint (e.g.POST /catalog/products/withimageKeys: [fileKey]).
Authorizations
The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'
Body
Request a presigned S3 POST policy for uploading a single file (max 5 GB). The returned fileKey is a temporary tmp/<uuid>/<fileName> path that can be passed to product/plan endpoints via imageKeys / fileKeys.
Response
Presigned upload URL generated.
S3 presigned POST policy. Upload the file by sending a multipart/form-data POST to url with every key in fields as a form field, plus a final file field containing the binary. The returned fileKey is what you pass back to kelviq.
S3 endpoint to POST the upload to.
"https://kelviq-uploads.s3.amazonaws.com/"
Form fields to include in the multipart/form-data POST (policy, signature, content-type, etc.). Send every field exactly as provided.
{
"Content-Type": "image/png",
"key": "tmp/108713b0-1f81-42cf-a16c-c83b1d4d4148/web-app-manifest-512x512.png",
"AWSAccessKeyId": "AKIA...",
"policy": "eyJleHBpcmF0aW9uIjogIjIwMjYtMDUtMjFUMTI6MDA6MDBaIiwgImNvbmRpdGlvbnMiOiBbXX0=",
"signature": "bWFkZS11cC1zaWduYXR1cmU="
}Temporary S3 key for the uploaded object. Pass this back to kelviq via imageKeys / fileKeys on the relevant catalog endpoint.
"tmp/108713b0-1f81-42cf-a16c-c83b1d4d4148/web-app-manifest-512x512.png"