Scaleway logo
Domain names - Registrar API

Domain names - Registrar API

The Domain names - Registrar API documentation allows you to buy, transfer and manage your domains and contacts (DNSSEC included) as a simple client or a reseller.

Read our reference content documentation for more information about domainsOpen in new context.

(switchcolumn) (switchcolumn)

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Scaleway Domains and DNS.

(switchcolumn) (switchcolumn)

Quickstart

  1. Configure your environment variables.

    Note

    This is an optional step that seeks to simplify your usage of the API.

    TerminalCode
    export SCW_ACCESS_KEY="<API access key>" export SCW_SECRET_KEY="<API secret key>" export SCW_PROJECT_ID="<Scaleway Project ID>"
  2. Get information about your domains.

    Important

    You must specify the domain you want to get information for if you want to get information about one specific domain.

    Run the following command to get information about your domains:

    TerminalCode
    curl https://api.scaleway.com/domain/v2beta1/search-domains?domains=domain-example.fr \ -H "X-Auth-Token: $secret_key"

    An output similar to the following displays:

    TerminalCode
    { "available_domains": [ { "domain": "domain-example.fr", "available": true, "tld": { "name": "fr", "dnssec_support": true, "duration_in_years_min": 1, "duration_in_years_max": 10, "idn_support": true, "offers": { "create": { "action": "create", "operation_path": "/network/domain/domains/fr/register", "price": { "currency_code": "EUR", "units": 123, "nanos": 456000000 } }, "late_renew": { "action": "late_renew", "operation_path": "/network/domain/domains/fr/late_renew", "price": { "currency_code": "EUR", "units": 123, "nanos": 456000000 } }, "renew": { "action": "renew", "operation_path": "/network/domain/domains/fr/renew", "price": { "currency_code": "EUR", "units": 123, "nanos": 456000000 } }, "trade": { "action": "trade", "operation_path": "/network/domain/domains/fr/trade", "price": { "currency_code": "EUR", "units": 123, "nanos": 456000000 } }, "transfer": { "action": "transfer", "operation_path": "/network/domain/domains/fr/transfer", "price": { "currency_code": "EUR", "units": 123, "nanos": 456000000 } } }, "specifications": { "afnic": "1", "grace_period": "1", "transfer_without_contact": "1" } } } ] }

    Note

  3. Manage an external domain.

    Refer to the DNS zones and records API documentation to find out how to register and manage an external domainOpen in new context.

  4. Purchase a domain.

    Run the following command to purchase a domain:

    TerminalCode
    curl https://api.scaleway.com/domain/v2beta1/buy-domains \ -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -d '{ "domains": [ "my_domain.fr" ], "project_id": "$project_id", "duration_in_years": 1, "owner_contact_id": "$owner_contact_id", "owner_contact": { "legal_form": "individual", "firstname": "John", "lastname": "DOE", "email": "email@mail.fr", "phone_number": "0123456789", "address_line_1": "37 rue de la barre", "zip": "59800", "city": "Lille", "country": "France", "lang": "fr_FR", "resale": true, "extension_fr": { "mode": "individual", "individual_info": { "whois_opt_in": true } } } }

    Note

  5. List your domains.

    Run the following command to list your domains:

    TerminalCode
    curl https://api.scaleway.com/domain/v2beta1/domains \ -H "X-Auth-Token: $SCW_SECRET_KEY"

    An output similar to the following displays:

    TerminalCode
    { "total_count": 1, "domains": [ { "domain": "my_domain.fr", "project_id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx", "organization_id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx", "auto_renew_status": "disabled", "dnssec_status": "disabled", "epp_code": [ "clientTransferProhibited" ], "expired_at": "1970-01-01T00:00:00Z", "updated_at": "1970-01-01T00:00:00Z", "registrar": "SCALEWAY", "is_external": false, "status": "active" } ] }
  6. Enable DNSSEC for external domains.

    • Run the following command if you have not set up DNSSEC at your registrar:
    TerminalCode
    curl https://api.scaleway.com/domain/v2beta1/domains/example.com/enable-dnssec \ -X POST \ -H "Content-Type: application/json" \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -d '{}'

    An output similar to the following displays:

    JSONCode
    { "domain":{ "domain":"example.fr", "auto_renew_status":"enabled", "dnssec_status":"disabled", "ds_records":[ { "key_id":49071, "algorithm":"ecdsap256sha256", "digest":{ "type":"sha_384", "digest":"c14421f739e35b62e3383d5972263f93610dea31da48a1990453752cf1b4f4f0314f75ecd0bc9061c51ee41ec7692204" } } ], "epp":[ "clientTransferProhibited" ], "expired_at":"2021-04-04T12:46:29Z", "updated_at":"2020-07-07T13:24:27Z", "registrar":"EXTERNAL", "is_external":true, "status":"active", "......" }

    Important

    Set up the information returned under ds_records in the output, in your registrar to configure DNSSEC for your external domain.

    • Run the following command if you have already set up DNSSEC at your registrar:
    TerminalCode
    curl https://api.scaleway.com/domain/v2beta1/domains/example.com/enable-dnssec \ -X POST \ -H "Content-Type: application/json" \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -d '{ "ds_record": { "algorithm": "rsamd5", "digest": { "type": "sha_1", "digest": "ABCD" } } }'
  7. Enable DNSSEC for internal domains.

    Find out how to enable DNSSEC for your internal domains using the Scaleway consoleOpen in new context or the APIOpen in new context.

    Important

    • If your DNS service is managed by Scaleway, no other information is required from you. You will however need to provide the DS or public key information.
      • If your domain uses another registrar and has the default Scaleway NS, you have to update the DS record at your registrar.

(switchcolumn)

Requirement

(switchcolumn)

Technical information

Regional availability

Scaleway Domains and DNS is currently available globally. Find out about product availability in our dedicated documentationOpen in new context.

Technical limitations

  • Only the owner of a domain can use and configure it with Domains and DNS
  • Each zone supports the creation of sub-zones, which inherit the parent's Project ID

Going further

For more information about Domains and DNS, you can check out the following pages: