### cURL Example for NextName API Source: https://www.nextname.nl/kb/nl/api This snippet shows how to make a GET request to the NextName API using cURL from the command line. Replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X GET \ 'https://api.nextname.nl/v1/users' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' ``` -------------------------------- ### Get TLD Pricing Information Source: https://www.nextname.nl/kb/nl/api/tlds/pricing This example shows the JSON response structure for retrieving pricing details, including standard registration, transfer, and renewal prices, as well as promotional offers for a specific TLD. ```json HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 { "data": [ { "tld": "eu", "pricing_standard": [ { "period": 12, "currency": "EUR", "register": 8.50, "transfer": 8.50, "renew": 8.50, "trade": 0, "restore": 12, "update": 0 } ], "pricing_promos": [ { "name": "2024-EU", "period": 12, "types": [ "register" ], "date_start": "2024-01-04T00:00:00+01:00", "date_end": "2024-12-31T00:00:00+01:00", "currency": "EUR", "price": 2 } ] } ], "pagination": { "current_page": 1, "per_page": 50, "total_pages": 1, "total_results": 1 } } ``` -------------------------------- ### DNS Record Example Source: https://www.nextname.nl/kb/nl/api/dnstemplates/records An example of a DNS record object, including its name, type, content, and timestamps. ```json { "name": "@", "type": "A", "content": "123.123.123.123", "date_created": "2023-10-28T18:38:20Z", "date_last_updated": null } ``` ```json { "record_id": "a038dfdceec363ed", "name": "www", "type": "A", "content": "123.123.123.123", "date_created": "2023-10-26T18:38:20Z", "date_last_updated": null } ``` -------------------------------- ### DNS Zone Record Examples Source: https://www.nextname.nl/kb/nl/api/domains/dnszone-records These examples demonstrate the structure of DNS zone records, including IPv6 (AAAA) and IPv4 (A) records. ```json { "fqdn": "testdomeinnaam.nl", "type": "AAAA", "content": "2001:1AF8:4700:A104:11::0000", "date_created": "2023-10-26T18:38:21Z", "date_last_updated": null } ``` ```json { "record_id": "35acff33afefb5bc", "name": "@", "fqdn": "testdomeinnaam.nl", "type": "A", "content": "123.123.123.123", "date_created": "2023-10-28T18:38:20Z", "date_last_updated": null } ``` ```json { "record_id": "a038dfdceec363ed", "name": "www", "fqdn": "www.testdomeinnaam.nl", "type": "A", "content": "123.123.123.123", "date_created": "2023-10-26T18:38:20Z", "date_last_updated": null } ``` -------------------------------- ### Get Premium Domains Sorted by Renewal Date Source: https://www.nextname.nl/kb/nl/api/domains/list Retrieve all premium domain names, sorted by their renewal date. This example demonstrates using PHP with cURL to make the API request. ```php "nieuwe-dns-template", "record_source" => "zonescan", "zonescan_domain" => "somedomain.nl", ]; $json_data = json_encode($a_data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_host . $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data ); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key","Content-Type: application/json")); if(curl_getinfo($ch, CURLINFO_HTTP_CODE) === 201) { echo "DNS template successfully created"; } ``` -------------------------------- ### Sample API Response for User Permissions Source: https://www.nextname.nl/kb/nl/api/user/permissions This is a sample JSON response from the /v2/user/permissions endpoint, showing the 'permissions' array and the 'allowed_ips' array. ```json { "permissions": [ "GET /v2/contacts", "GET /v2/contacts/{handle}", "POST /v2/contacts/{handle}", "DELETE /v2/contacts/{handle}", "POST /v2/contacts/{handle}/validate", "POST /v2/contacts/{handle}/validate/cancel", "POST /v2/contacts/{handle}/tlddata/{registry}", "PUT /v2/contacts/{handle}/tlddata/{registry}", "GET /v2/nsgroups", "GET /v2/nsgroups/{name}", "POST /v2/nsgroups/{name}", "DELETE /v2/nsgroups/{name}", "POST /v2/domains/{domain}/auth_code", "POST /v2/domain-availability", "POST /v2/domains/{domain}/auto_renewal", "POST /v2/domains/{domain}/contacts", "POST /v2/domains/{domain}/trade", "DELETE /v2/domains/{domain}", "POST /v2/domains/{domain}/restore", "POST /v2/domains/{domain}/renew", "PUT /v2/domains/{domain}/dnssec", "POST /v2/domains/{domain}/transfer_lock", "POST /v2/domains/{domain}/ns", "GET /v2/domains", "GET /v2/domains/{domain}", "POST /v2/domains/{domain}", "PUT /v2/domains/{domain}/tags", "GET /v2/domains/{domain}/dnszone", "PATCH /v2/domains/{domain}/dnszone", "GET /v2/domains/{domain}/dnszone/records", "PATCH /v2/domains/{domain}/dnszone/records", "PUT /v2/domains/{domain}/dnszone/records", "GET /v2/dns/templates", "GET /v2/dns/templates/{dnstemplate}/records", "GET /v2/dns/templates/{dnstemplate}/history", "PATCH /v2/dns/templates/{dnstemplate}", "POST /v2/dns/templates", "DELETE /v2/dns/templates", "PATCH /v2/dns/dnstemplates/{dnstemplate}/records", "PUT /v2/dns/dnstemplates/{dnstemplate}/records", "GET /v2/tlds/pricing", "GET /v2/account/removed-domains", "GET /v2/transfers", "GET /v2/transfers/{domain}", "POST /v2/transfers/{domain}", "GET /v2/user/permissions" ], "allowed_ips": [ "192.0.2.100", "203.0.113.25", "2001:db8:85a3::8a2e:370:7334" ] } ```