For the complete documentation index, see llms.txt. This page is also available as Markdown.

Purchase new domain

Purchase and register a new domain name.

Purchase new domain

post

Purchase and register a new domain name.

If registration fails, login to hPanel and check domain registration status.

If no payment method is provided, your default payment method will be used automatically.

If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account.

Some TLDs require additional_details to be provided and these will be validated before completing purchase.

Use this endpoint to register new domains for users.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
domainstringRequired

Domain name

Example: my-new-domain.tld
item_idstringRequired

Catalog price item ID

Example: hostingercom-domain-com-usd-1y
payment_method_idintegerOptional

Payment method ID, default will be used if not provided

Example: 1327362
additional_detailsobjectOptional

Additional registration data, possible values depends on TLD

Responses
200

Success response

application/json
idintegerOptional

Order ID

Example: 2957086
subscription_idstringOptional

Subscription ID

Example: Azz353Uhl1xC54pR0
statusstring · enumOptionalExample: completedPossible values:
currencystringOptional

Currency code

Example: USD
subtotalintegerOptional

Subtotal price (exc. VAT) in cents

Example: 899
totalintegerOptional

Total price (inc. VAT) in cents

Example: 1088
created_atstring · date-timeOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-timeOptionalExample: 2025-03-27T11:54:22Z
post/api/domains/v1/portfolio
POST /api/domains/v1/portfolio HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "domain": "my-new-domain.tld",
  "item_id": "hostingercom-domain-com-usd-1y",
  "payment_method_id": 1327362,
  "domain_contacts": {
    "owner_id": 741288,
    "admin_id": 546123,
    "billing_id": 741288,
    "tech_id": 741288
  },
  "additional_details": {},
  "coupons": []
}
{
  "id": 2957086,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "status": "completed",
  "currency": "USD",
  "subtotal": 899,
  "total": 1088,
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "company": null,
    "address_1": null,
    "address_2": null,
    "city": null,
    "state": null,
    "zip": null,
    "country": "NL",
    "phone": null,
    "email": "john@doe.tld"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Last updated

Was this helpful?