All Notary NPCs include the following note on their page.
A notary allows players to select and modify their surname, as well as cancel adopted relationships. To be eligible for a surname a player must be at least level 15. When selecting a surname it is important to keep in mind the same restrictions apply as with the primary name. No profanity or gibberish is permitted inside of a surname.