Skip to main content
Register a new token for your project. This records token metadata in Magna — the token contract must already be deployed on-chain. Use List Chains to look up the chainId for your network. Route: POST /api/external/v1/tokens/create

Headers

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

Body parameters

FieldTypeRequiredDescription
symbolstringYesToken ticker symbol (e.g. "USDC")
chainIdstring (uuid)YesMagna chain ID (from GET /chains)
decimalsnumber (int, 0–18)YesNumber of decimal places (typically 18 for ERC-20)
addressstring | nullNoOn-chain contract address; omit/null if not yet deployed
usdPricenumberNoCurrent USD price
totalSupplynumberNoTotal on-chain supply
logostringNoURL to the token logo image
mintDatestring (ISO 8601)NoMint / TGE date
isNativebooleanNoWhether this is the chain’s native gas token

Request example

curl -X POST https://app.magna.so/api/external/v1/tokens/create \
-H 'Content-Type: application/json' \
-H 'x-magna-api-token: YOUR_API_KEY' \
-d '{
  "symbol": "MAGNA",
  "chainId": "ch...uuid",
  "decimals": 18,
  "address": "0x...",
  "usdPrice": 1.25
}'

Response example

{
  "id": "tok...uuid",
  "symbol": "MAGNA",
  "chainId": "ch...uuid",
  "address": "0x...",
  "decimals": 18,
  "usdPrice": 1.25,
  "totalSupply": null,
  "logo": null,
  "mintDate": null,
  "isNative": false,
  "projectId": "p...uuid",
  "createdAt": "2024-04-15T21:26:21.000Z"
}