Part-7 | How to register and purchase a domain using GoDaddy API | Godaddy Domains API in PHP

godaddy api
Contact Information
Detailed Information

This is a PART-7 of GoDaddy Domain API. We will learn How to register and purchase a domain using GoDaddy API in PHP.

Script automation and database integration won’t be covered in this tutorial, but you can likely search the web for a few simple tutorials on automating PHP and MySQL database integration.

First things first, let’s discuss what you’ll need to start this tutorial. If you’re new to using GoDaddy’s Developer Portal and API, then I recommend perusing the following documentation:

GoDaddy Developer Portal
GoDaddy API Credentials
GoDaddy API Documentation

We will learn how to setup GoDaddy API?

You can see the video on the YouTube platform

GitHub Source Code

API Method for Purchasing Domain via GoDaddy

Within the body parameter, the following attributes must be submitted:

agreedAt — the time of day (DATETIME) for registration and purchase
agreedBy — the IP address making the API request
agreementKeys — the acknowledgment of and agreement to the terms and conditions for registering and purchasing domains with GoDaddy; value is DNRA
period — number years to register domain
privacy — whether or not to add privacy to purchase
nameServers — primary and secondary name servers to be set for the domain
renewAuto — whether or not auto-renewing is enabled or disabled at the time of purchase

In addition, be sure to have the following contact information on hand for the Billing, Registrant, Tech, and Admin sections of the body:

  • Address One
  • Address Two
  • City
  • Country
  • Postal Code
  • State
  • Email
  • Phone
  • Fax
  • Job Title
  • First Name
  • Last Name
  • Middle Name
  • Organization