GoDaddy API Required Phone Number Format
October 31, 2020
GoDaddy have an API that allows one to perform different actions on their platform.
Some of the API endpoints, e.g. the Register Domain endpoint, require an “Address” payload. However, the API documentation doesn’t provide any examples.
I was having trouble with the required phone number format, but I finally figured it out. The expected format is:
"+{country_dialling_code}.{rest of phone number}"
# For example, for a Kenyan phone number (country dialling code: 254):
"+254.725669669"
A full Address payload may look like this:
{
"addressMailing": {
"address1": "631 Marietta Street",
"address2": "Mad River Addrr",
"city": "Mad River",
"country": "KE",
"postalCode": "00100",
"state": "Nairobi"
},
"email": "[email protected]",
"nameFirst": "Ab",
"nameLast": "Ja",
"nameMiddle": "e",
"phone": "+254.725669669"
}
I’ll post tips & tricks to work with the GoDaddy API as I come across problems & quirks.
Happy Coding, and stay safe!