Last active
June 14, 2022 12:13
-
-
Save neerajjose/60a3f2170241e0058108dd0ba640b285 to your computer and use it in GitHub Desktop.
Sample Curl request to purchase a domain from godaddy using GoDaddy API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --location --request POST 'https://api.ote-godaddy.com/v1/domains/purchase' \ | |
| --header 'accept: application/json' \ | |
| --header 'Content-Type: application/json' \ | |
| --header 'Authorization: sso-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \ | |
| --data-raw '{ | |
| "consent": { | |
| "agreedAt": "2022-06-14T11:05:04Z", | |
| "agreedBy": "string", | |
| "agreementKeys": [ | |
| "DNRA" | |
| ] | |
| }, | |
| "contactAdmin": { | |
| "addressMailing": { | |
| "address1": "samuel building", | |
| "address2": "kochi minhsamsa", | |
| "city": "kochi", | |
| "country": "IN", | |
| "postalCode": "226010", | |
| "state": "kerala" | |
| }, | |
| "email": "user@example.com", | |
| "fax": "+91.9847965866", | |
| "jobTitle": "string", | |
| "nameFirst": "string", | |
| "nameLast": "string", | |
| "nameMiddle": "string", | |
| "organization": "string", | |
| "phone": "+91.9847965866" | |
| }, | |
| "contactBilling": { | |
| "addressMailing": { | |
| "address1": "samuel building", | |
| "address2": "kochi minhsamsa", | |
| "city": "kochi", | |
| "country": "IN", | |
| "postalCode": "226010", | |
| "state": "kerala" | |
| }, | |
| "email": "user@example.com", | |
| "fax": "+91.9847965866", | |
| "jobTitle": "string", | |
| "nameFirst": "string", | |
| "nameLast": "string", | |
| "nameMiddle": "string", | |
| "organization": "string", | |
| "phone": "+91.9847965866" | |
| }, | |
| "contactRegistrant": { | |
| "addressMailing": { | |
| "address1": "samuel building", | |
| "address2": "kochi minhsamsa", | |
| "city": "kochi", | |
| "country": "IN", | |
| "postalCode": "226010", | |
| "state": "kerala" | |
| }, | |
| "email": "user@example.com", | |
| "fax": "+91.9847965866", | |
| "jobTitle": "string", | |
| "nameFirst": "string", | |
| "nameLast": "string", | |
| "nameMiddle": "string", | |
| "organization": "string", | |
| "phone": "+91.9847965866" | |
| }, | |
| "contactTech": { | |
| "addressMailing": { | |
| "address1": "samuel building", | |
| "address2": "kochi minhsamsa", | |
| "city": "kochi", | |
| "country": "IN", | |
| "postalCode": "226010", | |
| "state": "kerala" | |
| }, | |
| "email": "user@example.com", | |
| "fax": "+91.9847965866", | |
| "jobTitle": "string", | |
| "nameFirst": "string", | |
| "nameLast": "string", | |
| "nameMiddle": "string", | |
| "organization": "string", | |
| "phone": "+91.9847965866" | |
| }, | |
| "domain": "samuele.com", | |
| "period": 1, | |
| "privacy": false, | |
| "renewAuto": false | |
| }' |
Author
Author
You can use this to get the details of the domain you purchased
curl --location --request GET 'https://api.ote-godaddy.com/v1/domains/samuele.com' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: sso-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those who are looking for an example to GoDaddy purchase domain api.
Ref: https://developer.godaddy.com/getstarted