Set Name
This POST route is used to set a name for a given address and domain.
It will overwrite existing names.
It will overwrite existing names.
Parameters
name
(string): The name being set, i.e., the "example" in example.testbrand.ethdomain
(string): The domain ("testbrand.eth")address
(string): The ethereum address the name points tocontenthash
(string)(Optional): The link for an ipfs or ipns websitetext_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": "example.xyz",
"name": "bob"
"address": "0x123abc...",
"text_records": {
"com.twitter": "namestonehq",
"com.github":"nftyslobo",
"com.discord":"superslobo",
"url":"https://www.google.com",
"location":"new york",
"description":"APIs are cool",
"avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg",
}
}
headers:
{
`Authorization: YOUR_API_KEY`
}
Curl Example
curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-d '{
"domain": "example.xyz",
"name": "bob",
"address": "0x123abc...",
"text_records": {
"com.twitter": "namestonehq",
"com.github":"nftyslobo",
"com.discord":"superslobo",
"url":"https://www.google.com",
"location":"new york",
"description":"APIs are cool",
"avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg"
}
}' \
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