Skip to content
Last updated

  • Create a Name.com account
  • Go to Account Settings → Security → API Tokens
  • Issue both development and production tokens

You’ll use these tokens to authenticate all your API requests.

✅ Tip: Keep your API token secure — treat it like a password.

🔒 Note: If your account has two-factor authentication (2FA) enabled, go to Account Settings → Security, and toggle Name.com API Access on at the bottom.

Step 2: Choose Your Environment

Name.com offers two separate environments:

EnvironmentBase URLPurpose
Productionhttps://api.name.comLive domain registrations, renewals, and management
Sandboxhttps://api.dev.name.comSafe testing and development — no real charges

Sandbox Notes:

  • Use your username with -test appended (e.g., reseller123-test)
  • The sandbox is API-only — not accessible through the browser
  • Requires a separate sandbox API token
  • Supports the Try It feature (limited to test environment)
  • Includes preloaded testing credit
  • Data does not sync with production
  • Test domains must be registered in sandbox before use

Step 3: Authenticate Your API Requests

Use HTTP Basic Auth with your username and API token.

curl -u your-username:your-api-token https://api.dev.name.com/core/v1/hello

For Sandbox, use your -test username and sandbox token. You can find this in the Name.com Web UI under Account Settings → Security → API Tokens

Step 4: Make Your First API Call

Call the GET /core/v1/hello endpoint to verify connectivity:

curl -u your-username:your-api-token https://api.dev.name.com/core/v1/hello

A Successful Response should look like this:

{
"server": "name.com api server",
"server_time": "2025-04-28T15:30:00Z",
"message": "hello world"
}

If you see this message — your authentication was successful!

Tip: Using "Try it"

  1. Go to an endpoint you'd like to test (e.g., GET /core/v1/domainsListDomains).
  2. Click the "Try it" button at the top right of the endpoint panel.
  3. In the "Environment" dropdown (next to "History"):
    • Select Mock Server to test with sample responses (no credentials needed).
    • Select Testing to use the Name.com sandbox environment at https://api.dev.name.com.
  4. Your sandbox credentials can be found in your name.com account under Account SettingsAPI Tokens (https://www.name.com/account/settings/api), in the Development/Test Environment section.
  5. Use your name.com Test Environment Username and Token for the "Try it" page's BasicAuth_username and BasicAuth_password inputs, respectively. (Make sure you click save for each input.)
  6. Click Send to make your test request.

Note: Only use sandbox credentials when testing in the development environment. Never use production credentials unless you are working with real data.

Troubleshooting Common Issues

ProblemSolution
401 UnauthorizedCheck your username and API token; verify you're using the right environment
Permission DeniedIf 2FA is enabled, go to Account Settings → Security and enable API Access
404 Not FoundMake sure the domain or resource exists; in sandbox, register test domains first

Next Steps