X1ID is live on X1 mainnet
X1ID / Resolve API
Resolve API / Resolve a handle

Resolve a handle

Stable
GET/resolve/{name}

Look up who owns a handle. Resolution is read-only and public — no wallet, no signature, and no API key. The base URL is https://api.x1id.io; there is no /v1 prefix. The REST endpoint returns the handle's owner; for per-chain addresses (X1 / SOL / ETH / BTC) and richer results, use the SDK below.

Handles and domains, never confused. X1ID handles (@jack) and X1NS domains (jack.x1) are complementary, and this endpoint resolves both — the response's namespace field always names which one answered, and a name that could be either shape is refused rather than guessed. See how they fit together.

Parameters

namestringRequired

The handle to resolve, with or without the leading @. Case-insensitive — x1 and @X1 resolve the same record. Given as a path segment: /resolve/x1.

Returns

Returns the resolution object for the handle. It reports the current owner and whether the handle is tokenized — it does not carry an addresses map. For a tokenized handle, owner is the current NFT holder, which this endpoint resolves for you — not the registry account's raw owner field.

Don't attribute a tokenized name from a raw owner field. The registry account's Handle.owner is the original registrant and is not updated when a tokenized name is sold or the NFT is sent. Reading it directly — or using any indexer / "handles by owner" listing that filters on it — will attribute a traded name to the wrong wallet (and may report it as tokenized: false with a null registered_at). To find who controls a name right now, use this endpoint or the @x1id/resolve SDK, both of which resolve the live NFT holder. Indexer-derived sale/activity feeds also lag the chain by a few seconds to a minute — treat the resolver as the source of truth.

For a handle on a lease-to-own term the result also includes an optional lease object ({ expires_at, lapsed }), so you can see the paid-through date and whether the term has lapsed; the field is omitted once the handle is owned permanently (as in the example below). A dotted name — a .sol/.eth name, or any subname like alices.shib — returns 400 { "error": "subnames aren't resolvable via this REST endpoint (top-level handles only) — resolve subnames with the @x1id/resolve SDK" }; this endpoint answers top-level @handles and X1NS TLDs only. An unregistered handle returns 404 { "error": "handle not registered" }.

Sending funds? Check lease.lapsed. A leased handle past its paid-through date still resolves here (the registry hasn't reclaimed it yet), but it can be reclaimed by someone else after its grace period. This endpoint is the only resolver that reports it — the SDK and the keyed /v1/resolve are lease-unaware. Refuse a send when lease.lapsed is true.

GET https://api.x1id.io/resolve/x1
{
  "input": "x1",
  "name": "x1",
  "namespace": "handle",
  "owner": "E2cELMtby3YYYbDdxamuGKWCyte3kwLywv19pEk2iUq6",
  "tokenized": false,
  "verification": "owner"
}
fieldmeaning
inputthe raw value you passed
namethe normalized handle (no @)
namespacewhich namespace answered: handle for an @handle. The endpoint also resolves X1NS domains, where this is the TLD (x1, xnt, or xen)
ownerthe wallet that owns the handle. For a tokenized handle this is informational — authority follows the NFT holder
tokenizedwhether the handle has been turned into an NFT
verificationalways the literal owner — a label, not a trust grade
lease(optional) present only while the handle is on a lease-to-own term: { expires_at, lapsed }. Omitted for permanently-owned handles

@x1 is a held name — the example resolves to the X1ID treasury. E2cELMtby3YYYbDdxamuGKWCyte3kwLywv19pEk2iUq6 is the treasury, which holds reserved and premium names until they reach an owner through the marketplace. A held name resolves like any other, with no flag. Before sending funds, check /quote/{name} and refuse when status is "held". See the pre-send checks.

Ownership you can audit. Every handle is a record on the X1 registry program (8JgnNWi24bq9uzfnT9XmkWxvaWMVgoEs9bu8QsHhLe1P), so a resolution can be verified independently on-chain. See Trust & transparency.

Reverse lookup

GET/reverse/{address}

Go the other way — an address back to its @handle. Only the address the owner has explicitly marked as their primary reverse-resolves, which is what prevents impersonation. An address with no primary returns 404 { "error": "no primary set" }.

curl https://api.x1id.io/reverse/H8FsKYhMyCN9brknY7tL4JXRbKZEjVh7XgrVmWcX1HiA
# 404 → { "error": "no primary set", "input": "H8FsKYhMyCN9brknY7tL4JXRbKZEjVh7XgrVmWcX1HiA" }

When a primary is set, it returns 200 with the shape { address, handle, name, tokenized, verified_at }: name is the primary name without the leading @, handle is the address of that name's on-chain Handle account, tokenized is whether the name is NFT-backed, and verified_at is the Unix time the owner set this primary pointer.

GET https://api.x1id.io/reverse/3bT5AL71EB5QpLW2ztLtRSxc5cZ6ASDzSc5b3eavZeWu
{
  "address": "3bT5AL71EB5QpLW2ztLtRSxc5cZ6ASDzSc5b3eavZeWu",
  "handle": "CBSPwKRMmxjYZeg3ZKtZjbK6dUvupd4qSCw89KyWSvZd",
  "name": "420x169",
  "tokenized": true,
  "verified_at": 1791749936
}

There is no GET /verify/<name> endpoint on this API — verification is read from on-chain attestations (see Verification) or via the SDK. An unknown path returns the API's generic 404 { "code": "NOT_FOUND", "error": true, "message": "not found" } (note the different shape from an endpoint's own { "error": "…", "input": "…" }).

Batch reverse lookup

POST/reverse/batch

Reverse-resolve up to 100 addresses in one request, for example every holder on a token page. Each address is answered exactly as /reverse/{address} would answer it, so only an address with a primary name gets a name back. Like the rest of this API it is keyless and sends CORS headers, so it works from a browser.

Send a JSON body with an addresses array of base58 addresses:

terminal
curl -X POST https://api.x1id.io/reverse/batch \
  -H 'Content-Type: application/json' \
  -d '{"addresses":["GGdYrcMq9fsEXoamvWDU4dBF4iLhPV933B2vZCaaTvGw","E2cELMtby3YYYbDdxamuGKWCyte3kwLywv19pEk2iUq6","3bT5AL71EB5QpLW2ztLtRSxc5cZ6ASDzSc5b3eavZeWu"]}'
batch.ts
const res = await fetch('https://api.x1id.io/reverse/batch', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ addresses: holders }), // up to 100 base58 addresses
});
if (res.status === 429 || res.status === 503) {
  const wait = Number(res.headers.get('Retry-After') ?? '2');
  // back off for `wait` seconds, then retry
}
const items: { address: string; name: string | null; error?: string }[] = await res.json();

The response is a JSON array with one item per address, in the order you sent them (a repeated address is looked up once and appears at each of its positions):

200 OK
[
  { "address": "GGdYrcMq9fsEXoamvWDU4dBF4iLhPV933B2vZCaaTvGw", "name": "e2emainnetwalk02" },
  { "address": "E2cELMtby3YYYbDdxamuGKWCyte3kwLywv19pEk2iUq6", "name": null },
  { "address": "3bT5AL71EB5QpLW2ztLtRSxc5cZ6ASDzSc5b3eavZeWu", "name": "420x169" }
]

The treasury E2cELM…iUq6 owns @x1 but has no primary name set, so its name is null, the same answer /reverse gives as a 404.

fieldmeaning
addressthe address exactly as you sent it
namethe address's primary name without the @, or null when it has none (or the lookup failed)
error(optional) present only when that one address could not be answered: INVALID_ADDRESS (not a valid base58 public key; don't retry it) or LOOKUP_FAILED (the lookup hit an upstream RPC problem; retryable, so retry that address later)

A null name with no error is a definitive "no primary name". The request as a whole can fail with:

StatusWhen
400the body is not JSON, has no addresses array, the array is empty, an entry isn't a string, or it holds more than 100 addresses
413the request body is larger than 8 KiB (100 addresses fit comfortably)
429the batch costs more rate-limit tokens than you have left; wait the Retry-After seconds
503every lookup in the batch failed (upstream RPC busy or unavailable); retry after Retry-After

A batch of n addresses costs ceil(n/10) rate-limit tokens, so 1 to 10 addresses cost 1 token and a full batch of 100 costs 10 (see Rate limits). Batch answers share the /reverse cache, and ?fresh=1 or Cache-Control: no-cache bypasses it for every address in the batch (see Caching).

For sustained high volume, use the keyed POST /v1/reverse/batch on the developer platform instead: the same request and item shape, up to 100 addresses, authenticated with an X-API-Key, and metered at 1 unit per 10 addresses against your key's quota.

Rate limits

The keyless endpoints are rate-limited per client IP: 100 requests per second sustained, with a burst of 200. Every response carries two headers so you can pace yourself:

HeaderMeaning
X-RateLimit-Limityour bucket size (the burst, 200)
X-RateLimit-Remainingrequests you can still make right now before you are limited

Two statuses ask you to slow down, and both carry a Retry-After header with the number of seconds to wait:

StatuserrorMeaning
429"rate limited"you are over your per-IP limit
503"upstream rpc busy, retry shortly" or "server busy, retry shortly"the API is shedding load because the upstream X1 RPC is busy; your request was not answered, not refused

On either one, wait at least the Retry-After seconds before retrying, and don't retry in a tight loop. A 503 is always safe to retry. Looking up many addresses? One batch of 100 costs 10 tokens, where 100 separate /reverse calls cost 100.

Caching

/resolve and /reverse answers (including each address in a batch) are cached for about 20 seconds. Found names and definitive misses (404) are cached; errors never are, so a retry after a 503 always does a fresh lookup. The X-Cache response header on /resolve and /reverse tells you which you got: HIT (served from the cache) or MISS (read from the chain just now).

To skip the cache and read the chain directly, add ?fresh=1 to the URL or send Cache-Control: no-cache:

terminal
curl 'https://api.x1id.io/resolve/x1?fresh=1'
curl -H 'Cache-Control: no-cache' https://api.x1id.io/resolve/x1

Read fresh before you move money. A cached answer can be up to 20 seconds old, and a name can change hands in that window. Before any payment or transfer decision, resolve with ?fresh=1 (or Cache-Control: no-cache) so you pay the current owner.

Health

GET/health

A liveness check for the service.

curl https://api.x1id.io/health
# → { "ok": true }

Version

GET/version

Reports the RPC endpoint the API reads from and that node's solana_core version. Returns 502 { "error": "rpc unreachable" } if the RPC can't be reached.

curl https://api.x1id.io/version
# → { "rpc": "https://rpc.mainnet.x1.xyz", "solana_core": "…" }

NFT metadata

GET/nft/{name}

Standard NFT metadata JSON for a handle — name (@name), symbol (X1ID), description, external_url (the handle's page on app.x1id.io), and attributes (length, rarity_tier, handle_type, and a bucket where one applies). The image is a self-contained SVG embedded as a data:image/svg+xml;base64,… URI, so nothing depends on external hosting.

curl https://api.x1id.io/nft/x1
# → { "name": "@x1", "symbol": "X1ID", "description": "…",
#     "image": "data:image/svg+xml;base64,…",
#     "external_url": "https://app.x1id.io/handle?name=x1",
#     "attributes": [ { "trait_type": "length", "value": 2 }, … ] }
GET/nft/{name}/image.png

The same card art as a 512×512 PNG, for apps that can't render SVG. It follows the same name rules and status codes as /nft/{name}. Errors return a small JSON body, never an image.

  • 200 with Content-Type: image/png (RGBA, transparent rounded corners), Cache-Control: public, max-age=300 and an ETag. Send If-None-Match to get a 304.
  • 400 invalid name, 404 not registered, 503 busy (honour Retry-After).
curl -o x1.png https://api.x1id.io/nft/x1/image.png

Price quote

GET/quote/{name}

The live registration price for a name — the same figure the app shows before you register (the tier price with the on-chain time ramp applied).

curl https://api.x1id.io/quote/alice
# available → { "input": "alice", "name": "alice", "available": true, "status": "available",
#               "price_lamports": 75000000000, "tier_index": 4 }
# already registered → { "input": "x1", "name": "x1", "available": false,
#               "status": "held" | "taken", "claimable": true | false,
#               "price_lamports": null, "tier_index": 0 }

An available name carries available: true, status: "available" and a live price_lamports. A name that's already on-chain is not priced (price_lamports: null): status is "held" (treasury-held, with claimable telling you whether it can be claimed via claim_reserved) or "taken" (owned by someone / tokenized).

Use status: "held" to protect a payment. A held name resolves to the X1ID treasury, and nothing in a resolve result says so. Wallets and payment flows should call /quote/{name} before sending to an @handle and refuse the send when status is "held". Availability is read from chain on every call.

NFT collection

GET/nft-collection

Metadata for the "X1ID Handles" collection parent — the verified collection every tokenized handle belongs to.

OpenAPI & JSON schemas

GET/openapi.json
GET/schema/resolve.json
GET/schema/agent-manifest.json

Machine-readable contracts: the full OpenAPI document for this API, plus JSON Schemas (2020-12) for a /resolve response and the agent manifest.

Gift email notification

POST/gift/notify

Emails a gift's claim link to a recipient. It's bound to a real, unclaimed on-chain voucher — so it can only ever notify about a gift that genuinely exists, never an open mail relay. Body: { "name": "<handle>", "to": "<email>" }.

The to address must be a bound email — one that already resolves to an x1id embedded wallet (the same pregenerated wallet /privy/wallet returns). The endpoint will not send a claim link to an arbitrary address; this is what keeps it from being an open relay.

curl -X POST https://api.x1id.io/gift/notify \
  -H 'content-type: application/json' \
  -d '{"name":"alice","to":"[email protected]"}'
# → { "ok": true }
statuscodemeaning
400INVALID_REQUESTmissing/malformed name or to, or to is not a valid email.
403EMAIL_NOT_BOUNDto is not a bound email — no embedded wallet resolves to it.
404NO_PENDING_GIFTno unclaimed on-chain voucher exists for that name.
424EMAIL_SEND_FAILEDthe voucher is valid but the upstream mail provider rejected or failed the send.
429RATE_LIMITEDtoo many notify attempts; retry after the window.

Send to a no-coiner by email

POST/privy/wallet

Pregenerates (or looks up) the recipient's x1id embedded Solana wallet for an email, so a sender can transfer XNT to a real address before the recipient has ever used crypto. The recipient later signs in at app.x1id.io with that email and the wallet — and the funds — are already there, with no claim step. Returns only the address. Body: { "email": "<email>" }.

curl -X POST https://api.x1id.io/privy/wallet \
  -H 'content-type: application/json' \
  -d '{"email":"[email protected]"}'
# → { "address": "…" }

SDK: multi-chain, records, and writes

The REST endpoint answers "who owns this handle". For per-chain addresses, records, and on-chain writes, use the @x1id/resolve SDK. It reads chain state directly over RPC (it never depends on this API's uptime), and its writes are unsigned instruction builders you sign and relay yourself — the SDK never holds keys. The @handle registry is on X1 mainnet (https://rpc.mainnet.x1.xyz).

This page targets @x1id/[email protected] — the current npm latest. For the full method-by-method reference see SDK reference.

npm install @x1id/[email protected]

Load the WASM module

Account derivation runs in a small Rust→WASM module — there is deliberately no JavaScript fallback, so wasm is a required field on ResolverConfig. The package ships the module at the subpath @x1id/resolve/wasm/x1_resolve_wasm.wasm. Load it once, at startup:

resolver.ts
import { readFileSync } from 'node:fs';
import { createRequire } from 'node:module';
import { WasmResolver, createResolver } from '@x1id/resolve';

const require = createRequire(import.meta.url);
const wasmPath = require.resolve('@x1id/resolve/wasm/x1_resolve_wasm.wasm');
const wasm = await WasmResolver.fromBytes(readFileSync(wasmPath));

// testnet works the same: rpcUrl: 'https://rpc.testnet.x1.xyz'
export const x1id = createResolver({ rpcUrl: 'https://rpc.mainnet.x1.xyz', wasm });
resolver.ts
// Vite / Rollup / webpack 5 — the `?url` suffix hands you the asset URL
import wasmUrl from '@x1id/resolve/wasm/x1_resolve_wasm.wasm?url';
import { WasmResolver, createResolver } from '@x1id/resolve';

const wasm = await WasmResolver.fromBytes(await (await fetch(wasmUrl)).arrayBuffer());

// testnet works the same: rpcUrl: 'https://rpc.testnet.x1.xyz'
export const x1id = createResolver({ rpcUrl: 'https://rpc.mainnet.x1.xyz', wasm });

Read: resolve across chains

resolve(input, { chain }) returns a Resolved object. X1/SOL come from the handle's authority; ETH/BTC from its on-chain records.

resolve.ts
import { x1id } from './resolver'; // the loaded resolver from above

const r = await x1id.resolve('@x1', { chain: 'SOL' });
// @x1 is held by the treasury — fine for a read, never a payment recipient.
// {
//   input: '@x1', name: 'x1', namespace: 'handle',
//   address: 'E2cELMtby3YYYbDdxamuGKWCyte3kwLywv19pEk2iUq6',
//   chain: 'SOL', verification: 'verified'
// }

// A handle with no record for the requested chain is explicit, never a wrong
// address: resolve('@x1', { chain: 'ETH' }) throws
// ResolveError { code: 'no-record-for-chain' }.

Read: reverse and records

const name = await x1id.reverse(address);
// 'nike'  → the address's primary @handle (no '@')
// null    → no primary set

const recs = await x1id.records('@x1');
// HandleRecord[]: { account, handle, coinType, chain, value, address,
//                   verified, updatedAt, stale }  ([] when none are set)

Write: sign and relay yourself

Registration is in the SDK. The package ships instruction builders for every registration path — buildRegisterIx (permanent), buildRegisterLeasedIx (lease-to-own), and buildCommitIx / buildRegisterRevealedIx (front-run-safe commit–reveal) — alongside builders for the rest of the registry. Only transfer and set_primary are not yet in the SDK; run those from app.x1id.io for now. Each builder returns an unsigned { programId, keys, data } you assemble, sign, and send:

subname.ts
import { buildCreateSubnameIx } from '@x1id/resolve';

const ix = buildCreateSubnameIx({
  programId,          // 8JgnNWi24bq9uzfnT9XmkWxvaWMVgoEs9bu8QsHhLe1P
  payer, owner,       // signers — owner is the parent handle's authority
  parent, subname,    // the parent and subname PDAs
  label: 'team',      // issues team.you
});
// add ix to a transaction, sign with payer + owner, send.

Also shipped, same build → sign → relay shape: gifts (buildCreateVoucherIx + HandleType), integrator rev-share (buildAddIntegratorIx), name locks (buildLockHandleIx), record delegation (buildSetRecordDelegateIx), typed text records (buildCreateTextRecordIx), and non-SVM record proofs (buildVerifyRecordEthIx / buildVerifyRecordBtcIx).

Which RPC? Point the resolver at the chain that holds the names you want. @handle resolution is on X1 mainnet (https://rpc.mainnet.x1.xyz); the same registry is also deployed on X1 testnet (https://rpc.testnet.x1.xyz) for development. On an RPC where the registry is not deployed a handle is an honest not-found, never a fabricated address.

The keyed /v1 platform

Free REST vs. keyed /v1

Free REST (api.x1id.io/resolve/…)Keyed /v1 (api.x1id.io/v1/…)
AuthnoneX-API-Key (server-side only), or x402 pay-per-call when no key is sent
Limitsper IP: 100 requests/s, burst 200 (details)per key: free 300/min and 15,000/day, partner 1,000/min and 100,000/day
Over the limit429429 RATE_LIMITED — a keyed request never falls through to x402
Resolvetop-level @handles, X1NS, launched customer TLDs; returns owner, tokenized, lease/v1/resolve/{name}?chain=X1|SOL|ETH|BTC returns address, chain, source; no lease
Also/reverse, POST /reverse/batch, /quote, /nftsign-in, Gate, agents, universal resolver

If you hold real funds, the SDK against your own RPC is the source of truth; both REST surfaces are a convenience on top of the same chain state. Use the free /quote and /resolve for the held and lapsed checks either way.

Everything above is public and keyless — resolution is a read anyone can do. There's also a keyed developer platform under https://api.x1id.io/v1, where a key identifies your app so the platform can rate-limit, meter, and run higher-level flows the public endpoint can't: sign-in, access gating, agent discovery, and cross-namespace resolution. Send your key in the X-API-Key header, or pay per call with x402.

Browse the docs

Resolve API