Set Name
Set Name
This POST route is used to set a name for a given address and domain. It will overwrite existing names.
Parameters
name
(string): The name being set, i.e., the "example" in example.testbrand.eth.domain
(string): The domain ("testbrand.eth").address
(string): The ethereum address the name points to.contenthash
(string)(Optional): The link for an ipfs or ipns website.text_records
(object)(Optional): An object containing key-value pairs representing the text records to be set.
Example
POST https://namestone.xyz/api/public_v1/set-name
{
"domain":"testbrand.eth",
"name":"example",
"address":"0xE997...3C57",
"text_records": {
"com.twitter":"namestonehq",
"com.github":"aslobodnik",
"com.discord":"superslobo",
"url":"https://www.namestone.xyz",
"location":"📍 nyc",
"description":"APIs are cool",
"avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg"
},
"contenthash":"ipfs://bafybeib65htzaufd5en2o6tpety3ekxu7kpy4qxyooe5szphpyim3hrhia"
}
headers:
{
`Authorization: YOUR_API_KEY`
}
Curl Example
curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: 16420e1e-e975-4204-b3df-65275b80e52a' \
-d '{
"domain":"testbrand.eth",
"name":"example",
"address":"0xE997...3C57",
"text_records": {
"com.twitter":"namestonehq",
"com.github":"aslobodnik",
"com.discord":"superslobo",
"email":"alex@namestone.xyz",
"url":"https://www.namestone.xyz",
"location":"📍 nyc",
"description":"APIs are cool",
"avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg"
},
"contenthash":"ipfs://bafybeib65htzaufd5en2o6tpety3ekxu7kpy4qxyooe5szphpyim3hrhia"
}' \
https://namestone.xyz/api/public_v1/set-name
Standard Text Records
Standard text records are those that the ens app will show.
- • description
- • com.discord
- • com.github
- • com.twitter
- • url
- • avatar