GET /api/v1/listings/availabe

Endpoint used to fetch mintable ENS name listings

This endpoint returns listed ENS names on our platform filterable by different parameters.

Example:


curl {BACKEND_API_URL}/api/v1/listings/available
    ?network=sepolia
    &parentLabel=name
    &subnameLabel=test
    &minterAddress=0x0306E14aAE9639Da26d2D158D9921B3Bded8F987
    &currentPage=0
    &pageSize=25

Parameters:

{
    "network":"sepolia" | "mainnet" // (required) returns listed names on provided chain
    "subnameLabel":string // (required) 
    "minterAddress":Address // (optinal) if not provided, api will not return listings whitelist or token gated access,
    "parentLabel":string // (optional) matches listed ens names by provided label
    "owner":Address // (optional) will return only listings which are owner by provided address
    "currentPage":number // (optional)
    "pageSize":number // (optional)
}

Response:

Paginated response:

{ 
  "totalItems":100,
  "currentPage":0,
  "pageSize":15,
  "items": [MintableListing]
}

MintableListing:

{
  "parentLabel": "example",
  "parentName": "example.eth",
  "parentNamehash": "asdfaf203890u89f9823498fy8234f"
  "subnameLabel": "my-subnamelabel",
  "mintPrice": 0.5,
  "listingOwner": "0x0306E14aAE9639Da26d2D158D9921B3Bded8F987",
  "created": 93489384,
  "mintVerificationReason": "NONE" | "WHITELIST" | "TOKEN_GATED_ACCESS"

}

mintVerificationReason specifies whether a verified minter address is required for minting a subname, this will be in case the ENS name listing uses whitelist or token-gated-access and the minter is whitelisted/owns the required ERC token. In this case, minting must be performed using POST /api/v1/mint/verified.

If the value of mintVerificationReason is "NONE", verification is not needed and minting parameters can be generated via POST /api/v1/mint endpoint.

Last updated