Domain auto-renew and transfer codes, explained
A domain transfer code is an authorization string that proves ownership when moving a domain to a new registrar, paired with auto-renew settings.
On this page 7 sections
A domain transfer code, often called an auth code or EPP code, is a unique authorization string generated by your registrar to approve moving your domain name to another provider. It acts as a one-time password verifying that you hold the legal authority to relocate the registration. When you manage domains on thelastapi, you can fetch your transfer code at any time or manage auto-renew settings directly from your terminal, the console, or over HTTP.
Losing track of domain ownership rules or renewal timelines can disrupt your live applications. This guide explains how transfer codes work, how auto-renewal operates behind the scenes, and how to control both using the CLI and API.
What is a domain transfer code and when do you need one?
A transfer code is an extra layer of security designed by registries to prevent unauthorized domain hijacking. When you initiate an external transfer request at a new registrar, that registrar will ask you for this authorization string. Once provided, the receiving registrar sends the code to the central registry to confirm that the transfer request is authentic.
You need a transfer code whenever you want to:
- Move the administrative registration of a domain to a different provider.
- Consolidate domain portfolios scattered across multiple services into a single dashboard.
- Transfer operational control of a registered asset to a client or buyer.
You do not need a transfer code if you are simply pointing DNS records, changing where an app is hosted, or directing traffic to another server. When you buy a domain name with an API or one command, your domain is hosted on our nameservers and can be attached to any internal project or external IP without moving the underlying registration. A transfer code is reserved specifically for moving the legal registration to an outside registrar.
How to get your transfer code
Only the account owner or a full-access key can request a transfer code. For security reasons, AI agents and Limited keys are restricted from reading transfer codes to prevent accidental or unauthorized registration transfers.
You can fetch the code using the CLI:
vibiz domains transfer-code sellshelf.appThe CLI outputs the raw transfer code. You can copy this string and paste it into the transfer initiation screen at your destination registrar.
If your systems manage infrastructure through HTTP requests, make an authenticated POST request to the auth-code endpoint:
curl -X POST "https://thelastapi.dev/v1/domains/sellshelf.app/auth-code" \
-H "Authorization: Bearer $VIBIZ_API_KEY"A successful response returns the code. If a Limited key makes this request, the API answers with a 403 status and an owner_only error code.
Why a transfer code might be locked or blocked
Getting a transfer code does not guarantee that a transfer can proceed immediately. Two common rules govern domain portability:
1. The 60-day registry lock
ICANN and domain registries impose an automatic 60-day transfer lock under two circumstances:
- The domain was registered less than 60 days ago.
- The domain was previously transferred between registrars less than 60 days ago.
This lock is set at the registry level, meaning no registrar can override it. If you bought a domain yesterday and request a transfer code today, the code can be issued, but the new registrar will reject the transfer until the 60-day window concludes.
2. Owner permission checks
Transfer codes expose the core ownership of the domain. If your API key lacks full-access permissions, the call will fail:
{
"error": {
"code": "forbidden",
"message": "This action requires owner permissions.",
"details": {
"reason": "owner_only",
"console_url": "https://thelastapi.dev/domains/sellshelf.app"
}
}
}When this happens, the account owner must run the command with a full-access key or fetch the code manually from the console under Domains.
How domain auto-renew works
Every domain bought through the platform is registered initially for one year (or up to 10 years if you pass --years at purchase). To prevent your production domains from lapsing accidentally, auto-renew is enabled by default.
Here is how the automated renewal cycle operates:
| Stage | Timeline | What happens |
|---|---|---|
| Renewal billing window | ~30 days before expiry | The system attempts to deduct the renewal fee from your account credits. |
| Successful renewal | Day 30 | The domain is extended for another year, and the new expiry date appears in your account. |
| Insufficient credits | Day 30 onwards | If credit balance is short, the system sends an email to account owners and retries daily. |
| Expiration | Day 0 | If no credits are added before the final deadline, the domain expires and enters registry grace periods. |
You can check the renewal status and expiry dates for all domains owned by your account:
vibiz domains ownedThis returns a structured list containing the expiry date, whether auto-renew is on or off, the projected renewal price in USD cents, and which projects currently use the name.
{
"object": "list",
"data": [
{
"domain": "sellshelf.app",
"status": "active",
"expires_at": "2026-04-18T12:00:00Z",
"auto_renew": true,
"renewal_price_cents": 1400,
"registered_to": "Ann Smith",
"used_on": [
{
"project_id": "prj_123",
"project_name": "shop",
"name": "@"
}
]
}
]
}If the balance is insufficient when the 30-day window opens, account owners receive an alert. You do not need to manually trigger renewal once you replenish your balance; as long as credits are added, the daily retry will execute the renewal automatically.
How to turn auto-renew off or renew early
You do not have to keep domains renewed if you intend to retire a brand or abandon a prototype. You can turn auto-renew off per domain or renew early at your convenience.
Toggling auto-renew
To allow a domain to lapse at the end of its paid cycle without incurring future charges, disable auto-renew:
vibiz domains auto-renew sellshelf.app offTo re-enable it later:
vibiz domains auto-renew sellshelf.app onThrough HTTP, submit a PATCH request:
curl -X PATCH "https://thelastapi.dev/v1/domains/sellshelf.app" \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"auto_renew": false}'Like transfer codes, modifying the auto-renew state is restricted to full-access owner keys. Agents and Limited keys receive a 403 owner_only response if they attempt to change it.
Renewing early
If you have available account credits and want to secure an active domain for additional years immediately, trigger an early renewal rather than waiting for the 30-day window:
vibiz domains renew sellshelf.app --years 1Via the API:
curl -X POST "https://thelastapi.dev/v1/domains/sellshelf.app/renew" \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"years": 1, "expected_price_cents": 1400}'The expected_price_cents property protects against unexpected registry price changes. If the registry raised prices between the time you quoted the renewal and submitted the call, the API returns a 409 conflict with price_changed rather than overcharging your balance.
Managing domains alongside your business setup
Domains are assets owned by the legal entity behind your project. If you form a US LLC or C-Corp from your terminal, you can register the domain under your corporate entity name by updating your saved owner details.
vibiz domains owner --openOwner details are collected once, stored securely, and automatically applied to future domain registrations. ICANN mandates that all domain owner contact details be verified within 15 days of registration. We route verification notices to the console so account owners can verify contact details in a single click without exposing personal email addresses to public spam.
If you already have a domain registered elsewhere that you do not wish to move, you do not need a transfer code. Instead, follow our guide to connect a domain you already own and point records to your project directly. Full details on DNS record structures, CAA records, and email forwarding are documented in our Domains documentation and Company formation docs.
To explore domains or audit existing registrations on your account, run vibiz domains owned or create your account at thelastapi.dev/start to start deploying applications with integrated domain tooling.
===BODY===
Frequently asked questions
What is the difference between a transfer code and an auth code?
They are the same thing; domain transfer codes are also commonly referred to as authorization codes, auth codes, or EPP codes depending on the registrar.
Can an AI agent retrieve my domain transfer code?
No, domain transfer codes, owner details, and auto-renew toggles are restricted to account owners with full-access keys and return a 403 owner_only status for agents.
Why can't I transfer a domain I bought two weeks ago?
Domain registries enforce an automatic 60-day lock on newly registered or recently transferred domains, during which the domain cannot be transferred to another provider.
What happens if my account lacks credits when a domain auto-renews?
About 30 days before expiry, the system tries to renew using your credits; if funds are short, account owners receive email alerts while the system retries the charge daily until credits are added. ===FAQ===