Search
K

Set Token Hosted Metadata

If you have chosen to host metadata on the HyperMint servers, metadata for a token can be set via this endpoint.
patch
https://api.hypermint.com/v1
/nft-contract/:contractId/token/:tokenId/metadata
Set HyperMint hosted metadata
All properties need to be sent with the request body. Properties that are not sent when using this endpoint will set those properties to null. Token id in the request is the integer token id on the network found in the UI or returned as part of contract information/when adding new tokens. I.E token id 1, 2, 1000, etc..
Parameters
Header
HM_ACCESS_KEY*
HyperMint Access Key
HM_ACCESS_KEY_SECRET*
HyperMint Access Key Secret
Body
name
String
Name of the token
description
String
Description of the token
image
String
Can use a prehosted image url if not use the upload token metadata media endpoint
external_url
String
external url usually is a website link
background_color
String
animation_url
String
Can use a prehosted animation url if not use the upload token metadata media endpoint
youtube_url
String
A url linking to a youtube video
attributes
Array
An array of metadata attributes object, see MetadataAttribute interface in the request interface section below for more details
Responses
200: OK
Responds with success
404: Not Found
Contract does not exist or you do not have permission
404: Not Found
The token does not exist to be updated

Request Interface

interface Metadata {
name?: string;
description?: string;
image?: string;
background_color?: string;
animation_url?: string;
youtube_url?: string;
attributes?: MetadataAttribute[];
}
export interface MetadataAttribute {
trait_type?: string;
value?: string;
display_type?: string;
}

Feedback

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