Skip to content

Commit

Permalink
Add curl showing how to register a domain
Browse files Browse the repository at this point in the history
  • Loading branch information
aeden committed Jun 25, 2018
1 parent e1c6448 commit bd719f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions curl/register_domain.sh
@@ -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"

0 comments on commit bd719f7

Please sign in to comment.