Skip to main content
POST
/
api
/
v1
/
subnames
Create or update a subname
curl --request POST \
  --url https://offchain-manager.namespace.ninja/api/v1/subnames \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --data '{
  "parentName": "oppunk.eth",
  "label": "alice",
  "owner": "0x1234...abcd"
}'
{
  "id": "123",
  "fullName": "alice.oppunk.eth",
  "parentName": "oppunk.eth",
  "label": "alice",
  "texts": {
    "email": "alice@example.com"
  },
  "addresses": {
    "ETH": "0x1234...abcd"
  },
  "metadata": {
    "role": "admin"
  },
  "contenthash": "ipfs://Qm...",
  "namehash": "0xabc123..."
}

Authorizations

x-auth-token
string
header
required

Body

application/json
parentName
string
required

Parent ENS name (e.g., oppunk.eth)

Required string length: 7 - 255
Example:

"oppunk.eth"

label
string
required

Subname label (e.g., alice if full name is alice.oppunk.eth)

Required string length: 1 - 255
Example:

"alice"

texts
object[]

Text records to set on the subname

Example:
[
{
"key": "email",
"value": "alice@example.com"
}
]
addresses
object[]

Address records to set on the subname

Example:
[{ "coin": 60, "value": "0x1234...abcd" }]
metadata
object[]

Arbitrary metadata stored offchain or in ENS records

Example:
[{ "key": "role", "value": "admin" }]
owner
string

Address of the new subname owner (must be a valid Ethereum address)

Example:

"0x1234...abcd"

contenthash
string

Contenthash (e.g., for IPFS/IPNS/Skynet)

Example:

"ipfs://0xe30101701220eec561a728cb61c29cfae..."

ttl
number

TTL value in seconds

Example:

3600

Response

Subname created or updated

id
string
required

Unique identifier of the subname

Example:

"123"

fullName
string
required

Full name of the subname (e.g., alice.oppunk.eth)

Example:

"alice.oppunk.eth"

parentName
string
required

Parent name (e.g., oppunk.eth)

Example:

"oppunk.eth"

label
string
required

Label of the subname (e.g., alice)

Example:

"alice"

texts
object
required

Text records associated with the subname

Example:
{ "email": "alice@example.com" }
addresses
object
required

Address records associated with the subname

Example:
{ "ETH": "0x1234...abcd" }
metadata
object
required

Metadata associated with the subname

Example:
{ "role": "admin" }
namehash
string
required

Namehash of the subname

Example:

"0xabc123..."

contenthash
string

Content hash of the subname

Example:

"ipfs://Qm..."

I