Create Portal
curl --request POST \
--url https://app.magna.so/api/external/v1/portals/create \
--header 'Content-Type: application/json' \
--header 'x-magna-api-token: <api-key>' \
--data '
{
"version": "V1",
"name": "<string>",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"googleAnalyticsId": "<string>",
"auth": {
"magnaApiToken": true,
"terminal3": true,
"x": true
},
"claimConfig": {
"startTimestamp": "2023-11-07T05:31:56Z",
"endTimestamp": "2023-11-07T05:31:56Z",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimStartMessage": "<string>"
},
"legalEntityName": "<string>",
"xHandle": "<string>",
"blogUrl": "<string>",
"discordInviteLink": "<string>",
"configuration": {
"allowClaimWithAlternateWallet": true,
"showVestingDetails": true,
"unifiedAllocationClaimView": true,
"requireAcceptingTermsBeforeClaim": true,
"showCategory": true,
"showDescription": true,
"hideConnectWalletSubtext": true,
"allowConnectBeforeClaimWindow": true,
"blockedCountryText": "<string>",
"paymentFiatEnabled": true,
"showSocialIconsInFooter": true,
"staking": true,
"customWalletAdapters": {
"metaMask": true,
"coinbase": true,
"rainbow": true,
"trust": true,
"rabby": true,
"mew": true,
"ronin": true,
"safe": true,
"injected": true,
"phantom": true,
"solflare": true,
"walletConnect": true,
"ledger": true,
"okx": true,
"sonic": true,
"backpack": true,
"bitget": true,
"kaia": true,
"mockWallet": true
},
"colors": {
"accent": "<string>",
"buttonText": "<string>",
"mainGradient": "<string>",
"background": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"ogImageUrl": "<string>",
"faviconUrl": "<string>",
"websiteUrl": "<string>"
}
},
"images": {
"background": {
"url": "<string>",
"width": 123,
"height": 123
},
"backgroundMobile": {
"url": "<string>",
"width": 123,
"height": 123
},
"logo": {
"url": "<string>",
"width": 123,
"height": 123
},
"logoIcon": {
"url": "<string>",
"width": 123,
"height": 123
},
"coin": {
"url": "<string>",
"width": 123,
"height": 123
},
"moreInfo": {
"url": "<string>",
"width": 123,
"height": 123
},
"banner": {
"url": "<string>",
"width": 123,
"height": 123
}
},
"content": {
"title": {
"title": "<string>",
"subtitle": "<string>"
},
"coinInfo": {
"title": "<string>",
"description": "<string>",
"readMoreCTA": "<string>",
"readMoreUrl": "<string>"
},
"qa": {
"title": "<string>",
"description": "<string>",
"questions": [
{
"question": "<string>",
"answer": "<string>"
}
]
},
"tags": [
"<string>"
],
"banner": {
"content": "<string>"
},
"sidebarContent": {
"publicPhaseText": "<string>",
"whitelistPhaseText": "<string>"
},
"wideHeader": true,
"successPage": {
"title": "<string>",
"subtitle": "<string>",
"goToUrl": "<string>",
"learnMoreUrl": "<string>",
"description": "<string>"
},
"showImportTokenButton": true,
"postClaimCTAs": [
{
"label": "<string>",
"url": "<string>"
}
],
"postClaimTweet": {
"label": "<string>",
"postBody": "<string>"
}
}
}
'import requests
url = "https://app.magna.so/api/external/v1/portals/create"
payload = {
"version": "V1",
"name": "<string>",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"googleAnalyticsId": "<string>",
"auth": {
"magnaApiToken": True,
"terminal3": True,
"x": True
},
"claimConfig": {
"startTimestamp": "2023-11-07T05:31:56Z",
"endTimestamp": "2023-11-07T05:31:56Z",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimStartMessage": "<string>"
},
"legalEntityName": "<string>",
"xHandle": "<string>",
"blogUrl": "<string>",
"discordInviteLink": "<string>",
"configuration": {
"allowClaimWithAlternateWallet": True,
"showVestingDetails": True,
"unifiedAllocationClaimView": True,
"requireAcceptingTermsBeforeClaim": True,
"showCategory": True,
"showDescription": True,
"hideConnectWalletSubtext": True,
"allowConnectBeforeClaimWindow": True,
"blockedCountryText": "<string>",
"paymentFiatEnabled": True,
"showSocialIconsInFooter": True,
"staking": True,
"customWalletAdapters": {
"metaMask": True,
"coinbase": True,
"rainbow": True,
"trust": True,
"rabby": True,
"mew": True,
"ronin": True,
"safe": True,
"injected": True,
"phantom": True,
"solflare": True,
"walletConnect": True,
"ledger": True,
"okx": True,
"sonic": True,
"backpack": True,
"bitget": True,
"kaia": True,
"mockWallet": True
},
"colors": {
"accent": "<string>",
"buttonText": "<string>",
"mainGradient": "<string>",
"background": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"ogImageUrl": "<string>",
"faviconUrl": "<string>",
"websiteUrl": "<string>"
}
},
"images": {
"background": {
"url": "<string>",
"width": 123,
"height": 123
},
"backgroundMobile": {
"url": "<string>",
"width": 123,
"height": 123
},
"logo": {
"url": "<string>",
"width": 123,
"height": 123
},
"logoIcon": {
"url": "<string>",
"width": 123,
"height": 123
},
"coin": {
"url": "<string>",
"width": 123,
"height": 123
},
"moreInfo": {
"url": "<string>",
"width": 123,
"height": 123
},
"banner": {
"url": "<string>",
"width": 123,
"height": 123
}
},
"content": {
"title": {
"title": "<string>",
"subtitle": "<string>"
},
"coinInfo": {
"title": "<string>",
"description": "<string>",
"readMoreCTA": "<string>",
"readMoreUrl": "<string>"
},
"qa": {
"title": "<string>",
"description": "<string>",
"questions": [
{
"question": "<string>",
"answer": "<string>"
}
]
},
"tags": ["<string>"],
"banner": { "content": "<string>" },
"sidebarContent": {
"publicPhaseText": "<string>",
"whitelistPhaseText": "<string>"
},
"wideHeader": True,
"successPage": {
"title": "<string>",
"subtitle": "<string>",
"goToUrl": "<string>",
"learnMoreUrl": "<string>",
"description": "<string>"
},
"showImportTokenButton": True,
"postClaimCTAs": [
{
"label": "<string>",
"url": "<string>"
}
],
"postClaimTweet": {
"label": "<string>",
"postBody": "<string>"
}
}
}
headers = {
"x-magna-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-magna-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version: 'V1',
name: '<string>',
tokenId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain: '<string>',
googleAnalyticsId: '<string>',
auth: {magnaApiToken: true, terminal3: true, x: true},
claimConfig: {
startTimestamp: '2023-11-07T05:31:56Z',
endTimestamp: '2023-11-07T05:31:56Z',
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claimStartMessage: '<string>'
},
legalEntityName: '<string>',
xHandle: '<string>',
blogUrl: '<string>',
discordInviteLink: '<string>',
configuration: {
allowClaimWithAlternateWallet: true,
showVestingDetails: true,
unifiedAllocationClaimView: true,
requireAcceptingTermsBeforeClaim: true,
showCategory: true,
showDescription: true,
hideConnectWalletSubtext: true,
allowConnectBeforeClaimWindow: true,
blockedCountryText: '<string>',
paymentFiatEnabled: true,
showSocialIconsInFooter: true,
staking: true,
customWalletAdapters: {
metaMask: true,
coinbase: true,
rainbow: true,
trust: true,
rabby: true,
mew: true,
ronin: true,
safe: true,
injected: true,
phantom: true,
solflare: true,
walletConnect: true,
ledger: true,
okx: true,
sonic: true,
backpack: true,
bitget: true,
kaia: true,
mockWallet: true
},
colors: {
accent: '<string>',
buttonText: '<string>',
mainGradient: '<string>',
background: '<string>'
},
metadata: {
title: '<string>',
description: '<string>',
companyName: '<string>',
ogImageUrl: '<string>',
faviconUrl: '<string>',
websiteUrl: '<string>'
}
},
images: {
background: {url: '<string>', width: 123, height: 123},
backgroundMobile: {url: '<string>', width: 123, height: 123},
logo: {url: '<string>', width: 123, height: 123},
logoIcon: {url: '<string>', width: 123, height: 123},
coin: {url: '<string>', width: 123, height: 123},
moreInfo: {url: '<string>', width: 123, height: 123},
banner: {url: '<string>', width: 123, height: 123}
},
content: {
title: {title: '<string>', subtitle: '<string>'},
coinInfo: {
title: '<string>',
description: '<string>',
readMoreCTA: '<string>',
readMoreUrl: '<string>'
},
qa: {
title: '<string>',
description: '<string>',
questions: [{question: '<string>', answer: '<string>'}]
},
tags: ['<string>'],
banner: {content: '<string>'},
sidebarContent: {publicPhaseText: '<string>', whitelistPhaseText: '<string>'},
wideHeader: true,
successPage: {
title: '<string>',
subtitle: '<string>',
goToUrl: '<string>',
learnMoreUrl: '<string>',
description: '<string>'
},
showImportTokenButton: true,
postClaimCTAs: [{label: '<string>', url: '<string>'}],
postClaimTweet: {label: '<string>', postBody: '<string>'}
}
})
};
fetch('https://app.magna.so/api/external/v1/portals/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/portals/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'version' => 'V1',
'name' => '<string>',
'tokenId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'domain' => '<string>',
'googleAnalyticsId' => '<string>',
'auth' => [
'magnaApiToken' => true,
'terminal3' => true,
'x' => true
],
'claimConfig' => [
'startTimestamp' => '2023-11-07T05:31:56Z',
'endTimestamp' => '2023-11-07T05:31:56Z',
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'claimStartMessage' => '<string>'
],
'legalEntityName' => '<string>',
'xHandle' => '<string>',
'blogUrl' => '<string>',
'discordInviteLink' => '<string>',
'configuration' => [
'allowClaimWithAlternateWallet' => true,
'showVestingDetails' => true,
'unifiedAllocationClaimView' => true,
'requireAcceptingTermsBeforeClaim' => true,
'showCategory' => true,
'showDescription' => true,
'hideConnectWalletSubtext' => true,
'allowConnectBeforeClaimWindow' => true,
'blockedCountryText' => '<string>',
'paymentFiatEnabled' => true,
'showSocialIconsInFooter' => true,
'staking' => true,
'customWalletAdapters' => [
'metaMask' => true,
'coinbase' => true,
'rainbow' => true,
'trust' => true,
'rabby' => true,
'mew' => true,
'ronin' => true,
'safe' => true,
'injected' => true,
'phantom' => true,
'solflare' => true,
'walletConnect' => true,
'ledger' => true,
'okx' => true,
'sonic' => true,
'backpack' => true,
'bitget' => true,
'kaia' => true,
'mockWallet' => true
],
'colors' => [
'accent' => '<string>',
'buttonText' => '<string>',
'mainGradient' => '<string>',
'background' => '<string>'
],
'metadata' => [
'title' => '<string>',
'description' => '<string>',
'companyName' => '<string>',
'ogImageUrl' => '<string>',
'faviconUrl' => '<string>',
'websiteUrl' => '<string>'
]
],
'images' => [
'background' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'backgroundMobile' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'logo' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'logoIcon' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'coin' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'moreInfo' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'banner' => [
'url' => '<string>',
'width' => 123,
'height' => 123
]
],
'content' => [
'title' => [
'title' => '<string>',
'subtitle' => '<string>'
],
'coinInfo' => [
'title' => '<string>',
'description' => '<string>',
'readMoreCTA' => '<string>',
'readMoreUrl' => '<string>'
],
'qa' => [
'title' => '<string>',
'description' => '<string>',
'questions' => [
[
'question' => '<string>',
'answer' => '<string>'
]
]
],
'tags' => [
'<string>'
],
'banner' => [
'content' => '<string>'
],
'sidebarContent' => [
'publicPhaseText' => '<string>',
'whitelistPhaseText' => '<string>'
],
'wideHeader' => true,
'successPage' => [
'title' => '<string>',
'subtitle' => '<string>',
'goToUrl' => '<string>',
'learnMoreUrl' => '<string>',
'description' => '<string>'
],
'showImportTokenButton' => true,
'postClaimCTAs' => [
[
'label' => '<string>',
'url' => '<string>'
]
],
'postClaimTweet' => [
'label' => '<string>',
'postBody' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/portals/create"
payload := strings.NewReader("{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-magna-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.magna.so/api/external/v1/portals/create")
.header("x-magna-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/portals/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-magna-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "po...uuid",
"name": "Acme Claim Portal",
"domains": [
"acme.demo-portal.magna.so"
],
"version": "V2",
"createdAt": "2024-04-15T21:26:21.000Z"
}
}Portals
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.
POST
/
api
/
external
/
v1
/
portals
/
create
Create Portal
curl --request POST \
--url https://app.magna.so/api/external/v1/portals/create \
--header 'Content-Type: application/json' \
--header 'x-magna-api-token: <api-key>' \
--data '
{
"version": "V1",
"name": "<string>",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"googleAnalyticsId": "<string>",
"auth": {
"magnaApiToken": true,
"terminal3": true,
"x": true
},
"claimConfig": {
"startTimestamp": "2023-11-07T05:31:56Z",
"endTimestamp": "2023-11-07T05:31:56Z",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimStartMessage": "<string>"
},
"legalEntityName": "<string>",
"xHandle": "<string>",
"blogUrl": "<string>",
"discordInviteLink": "<string>",
"configuration": {
"allowClaimWithAlternateWallet": true,
"showVestingDetails": true,
"unifiedAllocationClaimView": true,
"requireAcceptingTermsBeforeClaim": true,
"showCategory": true,
"showDescription": true,
"hideConnectWalletSubtext": true,
"allowConnectBeforeClaimWindow": true,
"blockedCountryText": "<string>",
"paymentFiatEnabled": true,
"showSocialIconsInFooter": true,
"staking": true,
"customWalletAdapters": {
"metaMask": true,
"coinbase": true,
"rainbow": true,
"trust": true,
"rabby": true,
"mew": true,
"ronin": true,
"safe": true,
"injected": true,
"phantom": true,
"solflare": true,
"walletConnect": true,
"ledger": true,
"okx": true,
"sonic": true,
"backpack": true,
"bitget": true,
"kaia": true,
"mockWallet": true
},
"colors": {
"accent": "<string>",
"buttonText": "<string>",
"mainGradient": "<string>",
"background": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"ogImageUrl": "<string>",
"faviconUrl": "<string>",
"websiteUrl": "<string>"
}
},
"images": {
"background": {
"url": "<string>",
"width": 123,
"height": 123
},
"backgroundMobile": {
"url": "<string>",
"width": 123,
"height": 123
},
"logo": {
"url": "<string>",
"width": 123,
"height": 123
},
"logoIcon": {
"url": "<string>",
"width": 123,
"height": 123
},
"coin": {
"url": "<string>",
"width": 123,
"height": 123
},
"moreInfo": {
"url": "<string>",
"width": 123,
"height": 123
},
"banner": {
"url": "<string>",
"width": 123,
"height": 123
}
},
"content": {
"title": {
"title": "<string>",
"subtitle": "<string>"
},
"coinInfo": {
"title": "<string>",
"description": "<string>",
"readMoreCTA": "<string>",
"readMoreUrl": "<string>"
},
"qa": {
"title": "<string>",
"description": "<string>",
"questions": [
{
"question": "<string>",
"answer": "<string>"
}
]
},
"tags": [
"<string>"
],
"banner": {
"content": "<string>"
},
"sidebarContent": {
"publicPhaseText": "<string>",
"whitelistPhaseText": "<string>"
},
"wideHeader": true,
"successPage": {
"title": "<string>",
"subtitle": "<string>",
"goToUrl": "<string>",
"learnMoreUrl": "<string>",
"description": "<string>"
},
"showImportTokenButton": true,
"postClaimCTAs": [
{
"label": "<string>",
"url": "<string>"
}
],
"postClaimTweet": {
"label": "<string>",
"postBody": "<string>"
}
}
}
'import requests
url = "https://app.magna.so/api/external/v1/portals/create"
payload = {
"version": "V1",
"name": "<string>",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"googleAnalyticsId": "<string>",
"auth": {
"magnaApiToken": True,
"terminal3": True,
"x": True
},
"claimConfig": {
"startTimestamp": "2023-11-07T05:31:56Z",
"endTimestamp": "2023-11-07T05:31:56Z",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claimStartMessage": "<string>"
},
"legalEntityName": "<string>",
"xHandle": "<string>",
"blogUrl": "<string>",
"discordInviteLink": "<string>",
"configuration": {
"allowClaimWithAlternateWallet": True,
"showVestingDetails": True,
"unifiedAllocationClaimView": True,
"requireAcceptingTermsBeforeClaim": True,
"showCategory": True,
"showDescription": True,
"hideConnectWalletSubtext": True,
"allowConnectBeforeClaimWindow": True,
"blockedCountryText": "<string>",
"paymentFiatEnabled": True,
"showSocialIconsInFooter": True,
"staking": True,
"customWalletAdapters": {
"metaMask": True,
"coinbase": True,
"rainbow": True,
"trust": True,
"rabby": True,
"mew": True,
"ronin": True,
"safe": True,
"injected": True,
"phantom": True,
"solflare": True,
"walletConnect": True,
"ledger": True,
"okx": True,
"sonic": True,
"backpack": True,
"bitget": True,
"kaia": True,
"mockWallet": True
},
"colors": {
"accent": "<string>",
"buttonText": "<string>",
"mainGradient": "<string>",
"background": "<string>"
},
"metadata": {
"title": "<string>",
"description": "<string>",
"companyName": "<string>",
"ogImageUrl": "<string>",
"faviconUrl": "<string>",
"websiteUrl": "<string>"
}
},
"images": {
"background": {
"url": "<string>",
"width": 123,
"height": 123
},
"backgroundMobile": {
"url": "<string>",
"width": 123,
"height": 123
},
"logo": {
"url": "<string>",
"width": 123,
"height": 123
},
"logoIcon": {
"url": "<string>",
"width": 123,
"height": 123
},
"coin": {
"url": "<string>",
"width": 123,
"height": 123
},
"moreInfo": {
"url": "<string>",
"width": 123,
"height": 123
},
"banner": {
"url": "<string>",
"width": 123,
"height": 123
}
},
"content": {
"title": {
"title": "<string>",
"subtitle": "<string>"
},
"coinInfo": {
"title": "<string>",
"description": "<string>",
"readMoreCTA": "<string>",
"readMoreUrl": "<string>"
},
"qa": {
"title": "<string>",
"description": "<string>",
"questions": [
{
"question": "<string>",
"answer": "<string>"
}
]
},
"tags": ["<string>"],
"banner": { "content": "<string>" },
"sidebarContent": {
"publicPhaseText": "<string>",
"whitelistPhaseText": "<string>"
},
"wideHeader": True,
"successPage": {
"title": "<string>",
"subtitle": "<string>",
"goToUrl": "<string>",
"learnMoreUrl": "<string>",
"description": "<string>"
},
"showImportTokenButton": True,
"postClaimCTAs": [
{
"label": "<string>",
"url": "<string>"
}
],
"postClaimTweet": {
"label": "<string>",
"postBody": "<string>"
}
}
}
headers = {
"x-magna-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-magna-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version: 'V1',
name: '<string>',
tokenId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain: '<string>',
googleAnalyticsId: '<string>',
auth: {magnaApiToken: true, terminal3: true, x: true},
claimConfig: {
startTimestamp: '2023-11-07T05:31:56Z',
endTimestamp: '2023-11-07T05:31:56Z',
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claimStartMessage: '<string>'
},
legalEntityName: '<string>',
xHandle: '<string>',
blogUrl: '<string>',
discordInviteLink: '<string>',
configuration: {
allowClaimWithAlternateWallet: true,
showVestingDetails: true,
unifiedAllocationClaimView: true,
requireAcceptingTermsBeforeClaim: true,
showCategory: true,
showDescription: true,
hideConnectWalletSubtext: true,
allowConnectBeforeClaimWindow: true,
blockedCountryText: '<string>',
paymentFiatEnabled: true,
showSocialIconsInFooter: true,
staking: true,
customWalletAdapters: {
metaMask: true,
coinbase: true,
rainbow: true,
trust: true,
rabby: true,
mew: true,
ronin: true,
safe: true,
injected: true,
phantom: true,
solflare: true,
walletConnect: true,
ledger: true,
okx: true,
sonic: true,
backpack: true,
bitget: true,
kaia: true,
mockWallet: true
},
colors: {
accent: '<string>',
buttonText: '<string>',
mainGradient: '<string>',
background: '<string>'
},
metadata: {
title: '<string>',
description: '<string>',
companyName: '<string>',
ogImageUrl: '<string>',
faviconUrl: '<string>',
websiteUrl: '<string>'
}
},
images: {
background: {url: '<string>', width: 123, height: 123},
backgroundMobile: {url: '<string>', width: 123, height: 123},
logo: {url: '<string>', width: 123, height: 123},
logoIcon: {url: '<string>', width: 123, height: 123},
coin: {url: '<string>', width: 123, height: 123},
moreInfo: {url: '<string>', width: 123, height: 123},
banner: {url: '<string>', width: 123, height: 123}
},
content: {
title: {title: '<string>', subtitle: '<string>'},
coinInfo: {
title: '<string>',
description: '<string>',
readMoreCTA: '<string>',
readMoreUrl: '<string>'
},
qa: {
title: '<string>',
description: '<string>',
questions: [{question: '<string>', answer: '<string>'}]
},
tags: ['<string>'],
banner: {content: '<string>'},
sidebarContent: {publicPhaseText: '<string>', whitelistPhaseText: '<string>'},
wideHeader: true,
successPage: {
title: '<string>',
subtitle: '<string>',
goToUrl: '<string>',
learnMoreUrl: '<string>',
description: '<string>'
},
showImportTokenButton: true,
postClaimCTAs: [{label: '<string>', url: '<string>'}],
postClaimTweet: {label: '<string>', postBody: '<string>'}
}
})
};
fetch('https://app.magna.so/api/external/v1/portals/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/portals/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'version' => 'V1',
'name' => '<string>',
'tokenId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'domain' => '<string>',
'googleAnalyticsId' => '<string>',
'auth' => [
'magnaApiToken' => true,
'terminal3' => true,
'x' => true
],
'claimConfig' => [
'startTimestamp' => '2023-11-07T05:31:56Z',
'endTimestamp' => '2023-11-07T05:31:56Z',
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'claimStartMessage' => '<string>'
],
'legalEntityName' => '<string>',
'xHandle' => '<string>',
'blogUrl' => '<string>',
'discordInviteLink' => '<string>',
'configuration' => [
'allowClaimWithAlternateWallet' => true,
'showVestingDetails' => true,
'unifiedAllocationClaimView' => true,
'requireAcceptingTermsBeforeClaim' => true,
'showCategory' => true,
'showDescription' => true,
'hideConnectWalletSubtext' => true,
'allowConnectBeforeClaimWindow' => true,
'blockedCountryText' => '<string>',
'paymentFiatEnabled' => true,
'showSocialIconsInFooter' => true,
'staking' => true,
'customWalletAdapters' => [
'metaMask' => true,
'coinbase' => true,
'rainbow' => true,
'trust' => true,
'rabby' => true,
'mew' => true,
'ronin' => true,
'safe' => true,
'injected' => true,
'phantom' => true,
'solflare' => true,
'walletConnect' => true,
'ledger' => true,
'okx' => true,
'sonic' => true,
'backpack' => true,
'bitget' => true,
'kaia' => true,
'mockWallet' => true
],
'colors' => [
'accent' => '<string>',
'buttonText' => '<string>',
'mainGradient' => '<string>',
'background' => '<string>'
],
'metadata' => [
'title' => '<string>',
'description' => '<string>',
'companyName' => '<string>',
'ogImageUrl' => '<string>',
'faviconUrl' => '<string>',
'websiteUrl' => '<string>'
]
],
'images' => [
'background' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'backgroundMobile' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'logo' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'logoIcon' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'coin' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'moreInfo' => [
'url' => '<string>',
'width' => 123,
'height' => 123
],
'banner' => [
'url' => '<string>',
'width' => 123,
'height' => 123
]
],
'content' => [
'title' => [
'title' => '<string>',
'subtitle' => '<string>'
],
'coinInfo' => [
'title' => '<string>',
'description' => '<string>',
'readMoreCTA' => '<string>',
'readMoreUrl' => '<string>'
],
'qa' => [
'title' => '<string>',
'description' => '<string>',
'questions' => [
[
'question' => '<string>',
'answer' => '<string>'
]
]
],
'tags' => [
'<string>'
],
'banner' => [
'content' => '<string>'
],
'sidebarContent' => [
'publicPhaseText' => '<string>',
'whitelistPhaseText' => '<string>'
],
'wideHeader' => true,
'successPage' => [
'title' => '<string>',
'subtitle' => '<string>',
'goToUrl' => '<string>',
'learnMoreUrl' => '<string>',
'description' => '<string>'
],
'showImportTokenButton' => true,
'postClaimCTAs' => [
[
'label' => '<string>',
'url' => '<string>'
]
],
'postClaimTweet' => [
'label' => '<string>',
'postBody' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/portals/create"
payload := strings.NewReader("{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-magna-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.magna.so/api/external/v1/portals/create")
.header("x-magna-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/portals/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-magna-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"V1\",\n \"name\": \"<string>\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain\": \"<string>\",\n \"googleAnalyticsId\": \"<string>\",\n \"auth\": {\n \"magnaApiToken\": true,\n \"terminal3\": true,\n \"x\": true\n },\n \"claimConfig\": {\n \"startTimestamp\": \"2023-11-07T05:31:56Z\",\n \"endTimestamp\": \"2023-11-07T05:31:56Z\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claimStartMessage\": \"<string>\"\n },\n \"legalEntityName\": \"<string>\",\n \"xHandle\": \"<string>\",\n \"blogUrl\": \"<string>\",\n \"discordInviteLink\": \"<string>\",\n \"configuration\": {\n \"allowClaimWithAlternateWallet\": true,\n \"showVestingDetails\": true,\n \"unifiedAllocationClaimView\": true,\n \"requireAcceptingTermsBeforeClaim\": true,\n \"showCategory\": true,\n \"showDescription\": true,\n \"hideConnectWalletSubtext\": true,\n \"allowConnectBeforeClaimWindow\": true,\n \"blockedCountryText\": \"<string>\",\n \"paymentFiatEnabled\": true,\n \"showSocialIconsInFooter\": true,\n \"staking\": true,\n \"customWalletAdapters\": {\n \"metaMask\": true,\n \"coinbase\": true,\n \"rainbow\": true,\n \"trust\": true,\n \"rabby\": true,\n \"mew\": true,\n \"ronin\": true,\n \"safe\": true,\n \"injected\": true,\n \"phantom\": true,\n \"solflare\": true,\n \"walletConnect\": true,\n \"ledger\": true,\n \"okx\": true,\n \"sonic\": true,\n \"backpack\": true,\n \"bitget\": true,\n \"kaia\": true,\n \"mockWallet\": true\n },\n \"colors\": {\n \"accent\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"mainGradient\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"metadata\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"companyName\": \"<string>\",\n \"ogImageUrl\": \"<string>\",\n \"faviconUrl\": \"<string>\",\n \"websiteUrl\": \"<string>\"\n }\n },\n \"images\": {\n \"background\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"backgroundMobile\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"logoIcon\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"coin\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"moreInfo\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n },\n \"banner\": {\n \"url\": \"<string>\",\n \"width\": 123,\n \"height\": 123\n }\n },\n \"content\": {\n \"title\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\"\n },\n \"coinInfo\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"readMoreCTA\": \"<string>\",\n \"readMoreUrl\": \"<string>\"\n },\n \"qa\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n },\n \"tags\": [\n \"<string>\"\n ],\n \"banner\": {\n \"content\": \"<string>\"\n },\n \"sidebarContent\": {\n \"publicPhaseText\": \"<string>\",\n \"whitelistPhaseText\": \"<string>\"\n },\n \"wideHeader\": true,\n \"successPage\": {\n \"title\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"goToUrl\": \"<string>\",\n \"learnMoreUrl\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"showImportTokenButton\": true,\n \"postClaimCTAs\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"postClaimTweet\": {\n \"label\": \"<string>\",\n \"postBody\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "po...uuid",
"name": "Acme Claim Portal",
"domains": [
"acme.demo-portal.magna.so"
],
"version": "V2",
"createdAt": "2024-04-15T21:26:21.000Z"
}
}Authorizations
Body
application/json
- Option 1
- Option 2
Available options:
V1 Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Minimum string length:
1Required string length:
1 - 15Pattern:
^[a-zA-Z0-9_]+$Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I