Create Asset
Define a new asset. In order to create tokens, you need first to define the asset using this endpoint. You'll need to do a payment operation later using the asset alias to actually trigger the creation (minting) process for that asset.
Facts
Attribute | Value |
---|---|
url | https://www.moneybutton.com/api/v2/me/assets |
http verb | POST |
Required scope | users.asset:write |
Attributes
Body
Parameter | Required | Type | Notes |
---|---|---|---|
name | True | string | min length 5 |
initialSupply | True | number | min value 1 |
protocol | True | string | Supported protocol ID |
description | False | string | |
avatar | False | string | |
paymailAlias | False | string | |
paymailDomain | False | string | |
url | False | string |
You can only specify *paymailAlias and paymailDomain parameters if you have a custom domain associated to your account (this feature is currently in a closed beta). We will generate a random alias if no alias is specified.
Example Request
{
"protocol": "SFP",
"name": "My First Token",
"initialSupply": 1000000,
"description": "My first token description",
"avatar": "https://mywebsite.com/token-avatar.png",
"url": "https://mywebsite.com"
}
Example Response
{
"id": "32",
"name": "My First Token",
"initialSupply": "1000000",
"userId": "5",
"paymailAlias": "e5045f6a00a2.asset",
"updatedAt": "2020-12-14T11:51:36.484Z",
"createdAt": "2020-12-14T11:51:36.484Z",
"avatar": "https://mywebsite.com/token-avatar.png",
"url": "https://mywebsite.com",
"description": "My first token description",
"paymailDomain": null,
}