Skip to main content
Request a pre-signed URL for uploading a portal creative (image or animation). Upload the file to the returned uploadUrl, then register it with Create Creative. Route: POST /api/external/v1/portals/creatives/upload-url

Headers

HeaderRequiredDescription
Content-TypeYesMust be application/json
x-magna-api-tokenYesYour Magna API token

Body parameters

FieldTypeRequiredDescription
fileNamestringYesName of the file to upload
contentTypestringYesMIME type (e.g. image/png)
kindenumYesimage (PNG/JPEG/SVG) or animation (Lottie / Unicorn-Studio JSON)

Request example

curl -X POST https://app.magna.so/api/external/v1/portals/creatives/upload-url \
-H 'Content-Type: application/json' \
-H 'x-magna-api-token: YOUR_API_KEY' \
-d '{
  "fileName": "hero.png",
  "contentType": "image/png",
  "kind": "image"
}'

Response example

{
  "uploadUrl": "https://...signed-upload-url...",
  "storageKey": "images/portal/hero-abc123.png",
  "publicUrl": "https://.../images/portal/hero-abc123.png"
}