Skip to main content
POST
/
api
/
external
/
v1
/
contracts
/
create
Create Contract
curl --request POST \
  --url https://app.magna.so/api/external/v1/contracts/create \
  --header 'Content-Type: application/json' \
  --header 'x-magna-api-token: <api-key>' \
  --data '
{
  "tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>"
}
'
{
  "isProcessed": true,
  "result": {
    "id": "c1...uuid",
    "name": "Main Vesting Contract",
    "type": "AIRLOCK",
    "tokenId": "tok...uuid",
    "address": null,
    "createdAt": "2024-04-15T21:26:21.000Z"
  }
}

Authorizations

x-magna-api-token
string
header
required

Body

application/json
tokenId
string<uuid>
required
Minimum string length: 1
contractType
enum<string>
required
Available options:
AIRDROP_FACTORY,
TOKEN_FACTORY,
ORDER_MANAGER_FACTORY,
CUSTODY_FACTORY,
STAKING_FACTORY,
AIRLOCK,
AIRLOCK_MERKLE_VESTER,
AIRDROP,
ORDER_MANAGER,
CUSTODY,
STAKING
name
string
Minimum string length: 1

Response

Successful response

isProcessed
boolean
result
any

Endpoint-specific result payload.