Most endpoints accept either method. DNS record endpoints are the exception:
create, get, update, delete, and sync on /api/v1/registrar/dns/{domain_name}/records/* currently accept an API key only. Listing records (GET /api/v1/registrar/dns/{domain_name}/records) accepts either method, same as everything else.
Authenticate with an API key
Generate an API key from your Dotlet dashboard, then pass it on every request in theX-API-Key header.
Authenticate with a bearer token
For endpoints that operate on behalf of a signed-in user, obtain a token from the password token endpoint and send it in theAuthorization header.
401, request a new token rather than retrying with the expired one.
This example works because listing DNS records accepts either an API key or a bearer token. Creating, reading a single record, updating, deleting, or syncing records currently accepts an API key only, use
X-API-Key for those, even in a session-based context.Handling authentication errors
Next step
Quickstart
Use your API key to check domain availability and register your first domain.