Skip to main content
The Fname registry server is hosted at https://fnames.farcaster.xyz It’s a simple HTTP service that’s responsible for issuing and tracking fnames. All Fname changes are recorded as a transfer. Registering an fname is a transfer from FID 0 to the user’s fid. Transferring an fname is a transfer from the user’s fid to another fid. Unregistering an fname is a transfer from the user’s fid to fid 0.
Registering an fname - When registering a new fname, calling this api is not sufficient. This only reserves the name to your fid. You must also submit a UserDataAdd message to the hub to set this name as your username.

Get Transfer History

To get a history of all transfers, make a GET request to /transfers
It also accepts the following query parameters:
  • from_id - The transfer id to start from for pagination
  • name - The fname to filter by
  • fid - The fid (either from or to) to filter by
  • from_ts - The timestamp (in seconds) to start from for pagination

Get current fname or fid

To get the most recent transfer event for an fid or fname, make a GET request to /transfers/current e.g. To determine the fid of @farcaster, make the following call and use the value from the to field in the return value
To determine the fname of fid 1, make the following call and use the value from the username field in the return value
Both will return the same transfers object:

Register or transfer an fname

To register a new fname, e.g. farcaster, first make sure the fname is not already registered. Then make a POST request to /transfers with the following body:
To generate the EIP-712 signature, use the following code:
This is the exact same kind of signature used in the ENS UsernameProofs provided to hubs to prove ownership of an ENS name. e.g.
Once a name is registered, it still needs a UserData message to be sent to the hub in order to actually set the username for the user. See examples in the hub-nodejs repo.