PUT: Add Tokens (ERC-1155)

New tokens can be added to a contract as needed by entering supply, price and max per transaction.

πŸ“˜

If you want to add tokens to an ERC721 contract you can use the Update Contract (ERC721) endpoint and update the total supply

https://api.hypermint.com/v1/nft-contract/:contractId/tokens

Adds Tokens to ERC-1155 Contract

Parameters

Header

ParameterDescription
HM_ACCESS_KEYHyperMint Access Key
HM_ACCESS_KEY_SECRETHyperMint Access Key Secret

Body

ParameterTypeRequiredDescription
tokensArrayYtokens is an array of tokens to be created. Token ids will be assigned in the order provided in the array. See AddTokenRequest interface below for more details

Response

CodeMeaning
🟒 200: OKSuccessfully added
🟠 404: Not FoundContract does not exist or you don't have permission
🟠 400: Bad RequestThe contract has been disabled by administrator
🟠 400: Bad RequestAttempted to create a token on an ERC-721 contract
interface AddTokensResponse {
    tokens: {
        tokenId: number;
        totalSupply: number;
        price: number;
        maxPerTransaction: number;
    }[];
    interactionId?: string;
}

πŸ“˜

See GET Interaction for a list of interaction types which are used and how to check the status if needed.

Request Interface

interface AddTokensRequest {
    tokens: {
        price: number;
        totalSupply: number;
        maxPerTransaction: number;
    }[];
}
ParameterTypeDescription
pricenumberThe price in ETH or SOL of the token. If not using buy functionality, this can be 0
totalSupplynumberThe maximum number of tokens which can be minted
maxPerTransactionnumberThe number of tokens each address can buy in one transaction. Set to 0 for infinite

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.