response = requests.post('https://sandbox.opusdns.com/v1/domains',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'opk_YOUR_API_KEY'
},
json={
'name': 'example.com',
'contacts': {
'registrant': 'contact_YOUR_CONTACT_ID',
'admin': 'contact_YOUR_CONTACT_ID',
'tech': 'contact_YOUR_CONTACT_ID',
'billing': 'contact_YOUR_CONTACT_ID'
},
'renewal_mode': 'renew',
'period': {
'value': 1,
'unit': 'y'
},
'nameservers': [
{'hostname': 'ns1.opusdns.com'},
{'hostname': 'ns2.opusdns.net'}
],
'create_zone': True
}
)
response = requests.post('https://api.opusdns.com/v1/domains',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'opk_YOUR_API_KEY'
},
json={
'name': 'example.com',
'contacts': {
'registrant': 'contact_YOUR_CONTACT_ID',
'admin': 'contact_YOUR_CONTACT_ID',
'tech': 'contact_YOUR_CONTACT_ID',
'billing': 'contact_YOUR_CONTACT_ID'
},
'renewal_mode': 'renew',
'period': {
'value': 1,
'unit': 'y'
},
'nameservers': [
{'hostname': 'ns1.opusdns.com'},
{'hostname': 'ns2.opusdns.net'}
],
'create_zone': True
}
)