Claim Name
This POST route is used to claim a name for a given address and domain.
It will throw an error if the name has already been claimed.
It will throw an error if the name has already been claimed.
URL Parameters
single_claim
(1 or 0): if this parameter is 1, each address can claim only one name
Post 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/claim-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/claim-name
Standard Text Records
Standard text records are those that the ENS app will show.
- description
- com.discord
- com.github
- com.twitter
- url
- avatar