> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magna.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Creative Upload URL

> Request a pre-signed URL to upload a portal asset (image or animation).

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](/apis/admin/portals/create-creative).

**Route:** `POST /api/external/v1/portals/creatives/upload-url`

## Headers

| Header              | Required | Description                |
| ------------------- | -------- | -------------------------- |
| `Content-Type`      | Yes      | Must be `application/json` |
| `x-magna-api-token` | Yes      | Your Magna API token       |

## Body parameters

| Field         | Type   | Required | Description                                                          |
| ------------- | ------ | -------- | -------------------------------------------------------------------- |
| `fileName`    | string | Yes      | Name of the file to upload                                           |
| `contentType` | string | Yes      | MIME type (e.g. `image/png`)                                         |
| `kind`        | enum   | Yes      | `image` (PNG/JPEG/SVG) or `animation` (Lottie / Unicorn-Studio JSON) |

## Request example

```sh theme={null}
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

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