> ## 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.

# Create Portal

> Create a claim portal. The body is a discriminated union on version — v1 uses a single configuration blob; v2 uses structured config tables.

Create a claim portal. The request body is a discriminated union on `version`:
**V1** portals use a single `configuration` blob, while **V2** portals use
structured config groups (theme, metadata, media, content, registration,
staking, FAQs, etc.). See the [Portal API](/apis/portal/overview) for the v1/v2
distinction.

**Route:** `POST /api/external/v1/portals/create`

## Headers

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

## Body parameters (V1)

| Field               | Type   | Required | Description                                                 |
| ------------------- | ------ | -------- | ----------------------------------------------------------- |
| `version`           | `"V1"` | Yes      | Portal version                                              |
| `claimConfig`       | object | Yes      | Token + contract + claim window                             |
| `configuration`     | object | Yes      | Portal configuration blob (colors, metadata, feature flags) |
| `content`           | object | No       | Portal copy / content                                       |
| `images`            | object | No       | Portal images                                               |
| `legalEntityName`   | string | No       | Legal entity displayed in the portal                        |
| `xHandle`           | string | No       | X (Twitter) handle                                          |
| `blogUrl`           | string | No       | Blog URL                                                    |
| `discordInviteLink` | string | No       | Discord invite link                                         |

## Body parameters (V2)

| Field                                                                                       | Type      | Required | Description                           |
| ------------------------------------------------------------------------------------------- | --------- | -------- | ------------------------------------- |
| `version`                                                                                   | `"V2"`    | Yes      | Portal version                        |
| `claimConfig`                                                                               | object    | Yes      | Token + contract + claim window       |
| `themeConfig`                                                                               | object    | No       | Colors, button styles, theme          |
| `metadata`                                                                                  | object    | No       | Title, description, OG image, favicon |
| `mediaConfig`                                                                               | object    | No       | Logos, backgrounds, animations        |
| `content`                                                                                   | object    | No       | Portal copy / content                 |
| `registrationConfig`                                                                        | object    | No       | Registration / eligibility settings   |
| `stakingConfig`                                                                             | object    | No       | Staking configuration                 |
| `enabledWallets`                                                                            | string\[] | No       | Wallet adapters to enable             |
| `socialProviders`                                                                           | array     | No       | Social login providers                |
| `faqs`                                                                                      | array     | No       | FAQ entries                           |
| `helpLinks`                                                                                 | array     | No       | Help links                            |
| `xHandle` · `blogUrl` · `discordInviteLink` · `paragraphHandle` · `posthogKey` · `tosMdUrl` | string    | No       | Optional metadata                     |

<Note>
  The `configuration` (V1) and structured config groups (V2) carry many nested
  fields. Create a portal in the admin dashboard once and fetch it with
  [Get Portal](/apis/admin/portals/portal-by-id) to see the exact shape your
  project uses, then mirror it here.
</Note>

## Request example (V2)

```sh theme={null}
curl -X POST https://app.magna.so/api/external/v1/portals/create \
-H 'Content-Type: application/json' \
-H 'x-magna-api-token: YOUR_API_KEY' \
-d '{
  "version": "V2",
  "claimConfig": { "tokenId": "tok...uuid", "contractId": "c...uuid" },
  "metadata": { "title": "Acme Claim", "companyName": "Acme Inc." }
}'
```

## Response example

```json theme={null}
{
  "id": "po...uuid",
  "name": "Acme Claim Portal",
  "domains": ["acme.demo-portal.magna.so"],
  "version": "V2",
  "createdAt": "2024-04-15T21:26:21.000Z"
}
```
