How do registrars register authoritative name servers with root name servers?
Many registries use the Extensible Provisioning Protocol (EPP) to facilitate their registrar interactions.
It's worth noting that this is a whole separate protocol from DNS itself, specifically dealing with name registration and provisioning. It only indirectly populates the relevant zone in DNS.
Unless you are either a registry or a registrar it really doesn't matter much what sort of protocols / APIs these parties use but if you do want to read up on it, here are some of the relevant specs for EPP:
- Extensible Provisioning Protocol (EPP)
- Extensible Provisioning Protocol (EPP) Domain Name Mapping
- Extensible Provisioning Protocol (EPP) Host Mapping
- Extensible Provisioning Protocol (EPP) Contact Mapping
- Extensible Provisioning Protocol (EPP) Transport over TCP
- Domain Name System (DNS) Security Extensions Mapping for the Extensible Provisioning Protocol (EPP)
As more of a sidenote, the root servers deal with the root zone (aka `.`), a TLD zone is not the same as the "root". If you register for instance `example.com` through your registrar nothing changes in the root zone, your delegation is only entered into the `com` zone.