Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add curl showing how to register a domain
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Usage: TOKEN=token ./register_domain.sh account_id domain_name attributes | ||
# | ||
# Where `account_id` is the numeric ID of the account you are operating on, `domain_name` is | ||
# the name you are registering, and `attributes` is a JSON structure representing the registration | ||
# attributes. | ||
# | ||
# For example: | ||
# | ||
# `TOKEN=token ./register_domain.sh 111 example.co.uk '{"registrant_id":"111","extended_attributes":{"uk_legal_type":"FIND","registered_for":"Your Name"}}}' | ||
curl -i "https://api.sandbox.dnsimple.com/v2/$1/registrar/domains/$2/registrations" -H "Authorization: Bearer ${TOKEN}" -H "Accepts: application/json" -H "Content-Type: application/json" -X POST -d "$3" |