API Access & Documentation

Getting Started with the API

By the Domain India teamPublished 8 min read
Knowledge base article
Contents (6 sections)

Developers often ask whether Domain India has an API for managing an account in code. There's no general REST API with API keys for your whole account. There are four supported ways to work with your services programmatically, and each one covers a different job. This guide explains which to use and how to make your first call safely.

Key takeaways

Domain India doesn't publish a REST API with API keys for domains, billing or orders, and the client area has no API-key page. For programmatic access, use the route that fits the job: connect an AI assistant (or any MCP client) to https://domainindia.com/mcp with OAuth; deploy App Platform apps from CI with a deploy token; script your cPanel hosting with the cPanel UAPI and your own API token on port 2083. For anything else, ask support.

1. What is and isn't available

You want toRouteAuthentication
Ask about or check domains, invoices, renewals, tickets, email and appsAI assistant or MCP client at https://domainindia.com/mcpOAuth sign-in with permissions you approve
Open or reply to a support ticket, or restart an App Platform app, from an assistantThe same connection, with the Support or Apps permissionOAuth sign-in with permissions you approve
Deploy an App Platform app from GitHub Actions or another CIApp Platform deploy tokenA per-app token from the Deploy Tokens tab
Manage email accounts, files, databases or DNS on cPanel hosting from a scriptcPanel UAPI on port 2083Your own cPanel API token
Register, renew or transfer domains, place orders or pay invoices by APINot availableUse the client area

Older versions of this page described an API address, token menu and endpoints that do not exist. If you have code written against them, it will not work. Use one of the routes above instead.

2. Connect an assistant or MCP client

Domain India runs a Model Context Protocol (MCP) server at https://domainindia.com/mcp. Claude, ChatGPT, Claude Code and any client that supports remote MCP servers with OAuth can connect to it. It registers itself, so there is no API key or client ID to copy.

  1. Sign in to the client area
    in the browser you will use, so the connection goes straight to the permission screen.
  2. Add the server.
    In your assistant, add a custom connector with the address https://domainindia.com/mcp, with no trailing slash and no www. In Claude Code, run claude mcp add --transport http domainindia https://domainindia.com/mcp, then authenticate from /mcp.
  3. Approve only what you need.
    Account, Domains, Websites and Services are view only. Support and Apps are the only permissions that can change anything.
  4. Ask in plain language.
    For example, "Which of my domains expire in the next 60 days?"

Some things are never possible through this connection, whatever you approve: payments, getting a domain's transfer (EPP) code, changing nameservers or contact details, reading or changing passwords, and cancelling or deleting anything. Access keys last one hour and renew in the background. A connection unused for 30 days lapses, and you can disconnect any app instantly on the Connected apps page.

The full walkthrough, with screens for each assistant, is Connecting your Domain India account to an AI assistant.

3. Deploy App Platform apps from CI

For the App Platform, the programmatic route is a deploy token. In your app's Deploy Tokens tab, click Create Token. The token is shown once, together with a ready-to-run command that already contains your token and your app's deploy address. Package your project with tar, then run that command from your terminal or CI job.

  • Each token works for one app only, and you can hold up to 5 per app.
  • Uploads can be up to 512 MB.
  • There is no automatic deploy on push. Your CI job runs the command.
  • Copy the command from the tab. Don't type the deploy address from memory.

The full guide is Deploying with a deploy token.

4. Script your cPanel hosting with UAPI

On cPanel hosting, you can call your own account's cPanel API (UAPI) over HTTPS on port 2083.

  1. Create a token.
    In cPanel, open Security › Manage API Tokens, create a token with a descriptive name, and copy it. cPanel shows it only once.
  2. Find your panel address.
    Use the panel address shown on your hosting service's Access tab in the client area.
  3. Make a test call.
    List your email accounts with the request below.
  4. Store the token safely.
    Put it in an environment variable or a secrets store, never in code you commit.
cPanel Manage API Tokens page with the Create API Token form: token name, expiry choice, a danger warning and the Create button
Create the token in cPanel under Manage API Tokens.
bash
curl -s -H "Authorization: cpanel yourusername:YOUR_API_TOKEN" \
  "https://your-panel-host:2083/execute/Email/list_pops"

A working call returns JSON with "status": 1 and a data array. A status of 0 comes with an errors array that explains what failed. Other modules follow the same pattern: /execute/Module/function.

Keep these limits in mind:

  • WHM's API (port 2087) is not available to shared hosting accounts. UAPI covers your own account only.
  • Scripts that run on the hosting itself have some PHP functions disabled on shared hosting, including proc_open and stream_socket_client. See PHP disabled functions on shared hosting.
  • DirectAdmin hosting does not offer customer API login keys. Webuzo and Windows (Plesk) hosting have no API route documented here, so ask support if you need one.

To try calls interactively, see API testing with Postman.

5. Keep tokens and connections safe

Treat every token like a password

A cPanel API token has the same power as your cPanel login, and a deploy token can replace your running app. Never put either in browser code, a public repository, a screenshot or a ticket. If one leaks, delete it straight away and create a new one.

  • One token per purpose. Name each token after the script or pipeline that uses it, so you can revoke one without breaking the others.
  • Least privilege. On the MCP permission screen, tick only what the assistant needs. Leave Support and Apps off unless you want it to act.
  • Check the return address, not the name. On the permission screen, an app's name is only a claim. If you did not just start a connection yourself, deny the request.
  • Review regularly. Check Connected apps, and your cPanel token list, every few months and remove anything unused.

6. What to do when you need more

If your project needs something these routes don't cover, such as registering domains in bulk from your own software, open a ticket and describe the use case. Support will tell you what is possible. Until then, orders, payments, renewals and transfers are done in the client area.

If you are choosing where to build: the App Platform runs Node.js apps automatically and anything else with a Dockerfile, with deploy tokens for CI. cPanel hosting suits PHP sites that you script through UAPI. A VPS gives you full control of your own server.

Does Domain India have a REST API with API keys?

No. There is no general REST API with API keys for domains, billing or orders, and the client area has no API-key page. For programmatic access, use the MCP connection at domainindia.com/mcp, App Platform deploy tokens, or the cPanel UAPI on your own hosting account.

How do I connect my Domain India account to Claude or ChatGPT?

Add https://domainindia.com/mcp as a custom connector, sign in to your Domain India account, and approve the permissions you want. Most permissions are view only; only Support and Apps can make changes.

Can an AI assistant pay invoices or transfer my domain?

No. There is no permission for payments, transfer codes, nameserver or contact changes, passwords, or cancelling anything, so no connected app can do these things.

Can I use the cPanel API on Domain India shared hosting?

Yes, for your own account. Create a token in cPanel under Security, Manage API Tokens, and call UAPI on port 2083 with the header Authorization: cpanel yourusername:TOKEN. WHM's API is not available to shared hosting accounts.

Can I use the DirectAdmin API with login keys?

No. Login keys are not available to customers on Domain India DirectAdmin hosting. Ask support if you need to automate something on a DirectAdmin account.

How do I deploy to the App Platform from GitHub Actions?

Create a deploy token in your app's Deploy Tokens tab. It comes with a ready-to-run upload command. Store the token as a CI secret and have your pipeline package the project with tar and run that command.

Can I register domains through an API as a reseller?

There is no public domain registration API. Open a support ticket and describe your use case, and support will tell you what is possible.

Ready to automate? Connect an assistant from Connected apps, read Deploying with a deploy token for CI, or open a ticket if your use case isn't covered. Support is on 24/7 live chat, and tickets get a first response within 15 minutes.

Not sure which route fits?

Tell us what you want to automate and which services you use, and we will point you to the right tool.

Ask support

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Domain India API: MCP, Deploy Tokens and cPanel UAPI