NavigationContentFooter

Domains and DNS - Registrar API

Introduction

The Domains and DNS 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 domains.

Concepts

Refer to our dedicated concepts page to find definitions of the different terms referring to Scaleway Domains and DNS.

Quickstart

  1. Configure your environment variables.

    Note

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

    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:

    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:

    {
    "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
    • available indicates wether the domain is available to be ordered and created at the registry
    • tld indicates wether TLD is supported, the different actions and prices available. If TLD is not supported, null is returned in the output
    • offers indicates the different actions and prices available
    • specifications includes tags to indicate TLD specifications
    • currency_code indicates the available currency. Currently only euro is available
    • units and nanos compose the price
  3. Manage an external domain.

    Refer to the Domains and DNS API documentation to find out how to register and manage an external domain.

  4. Purchase a domain.

    Run the following command to purchase a domain:

    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": {
    "legal_form": "individual",
    "country": "FR",
    "lastname": "DOE",
    "firstname": "John",
    "city": "Lille",
    "address_line_1": "37 rue de la barre",
    "zip": "59800",
    "email": "email@mail.fr",
    "country": "FR",
    "phone_number": "0123456789",
    "resale": true,
    "extension_fr": {
    "mode": "individual",
    "individual_info": {
    "whois_opt_in": true
    }
    }
    }
    }
    Note

    extension_fr.individual_info.whois_opt_in returns false if the information of the domain's owner is anonymous. It returns true if the information of the domain's owner is published in whois.

  5. List your domains.

    Run the following command to list your domains:

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

    An output similar to the following displays:

    {
    "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:
    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:

    {
    "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:
    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 console or the API.

    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.
Requirements
  • You have a Scaleway account
  • You have created an API key and that the API key has sufficient IAM permissions to perform the actions described on this page
  • You have your Organization ID
  • You are the owner of your domain
  • You have installed curl

Technical information

Regional availability

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

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 futher

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

  • Domains and DNS Documentation
  • Scaleway Slack Community join the #domains channel
  • Contact our support team.

Contacts

There are up to three different types of contacts for a domain: Owner: The owner is the registrant and owner of the domain. Administrative: The administrative contact of a domain is typically in charge of performing all domain-related actions. Technical: The technical contact of a domain takes care of technical issues like DNS records.

It is possible to be the Owner and the Administrative and / or the Technical contact all at once but some registries may have specific requirements.

POST
/domain/v2beta1/check-contacts-compatibility
GET
/domain/v2beta1/contacts
GET
/domain/v2beta1/contacts/{contact_id}
PATCH
/domain/v2beta1/contacts/{contact_id}

Order

Order a new domain or request an operation on an existing domain

POST
/domain/v2beta1/buy-domains
POST
/domain/v2beta1/domains/{domain}/trade
POST
/domain/v2beta1/domains/transfer-domains
POST
/domain/v2beta1/external-domains
DELETE
/domain/v2beta1/external-domains/{domain}
POST
/domain/v2beta1/renew-domains

Domains

Manage your domains

GET
/domain/v2beta1/domains
GET
/domain/v2beta1/domains/{domain}
PATCH
/domain/v2beta1/domains/{domain}
GET
/domain/v2beta1/domains/{domain}/auth-code
POST
/domain/v2beta1/domains/{domain}/disable-auto-renew
POST
/domain/v2beta1/domains/{domain}/disable-dnssec
POST
/domain/v2beta1/domains/{domain}/enable-auto-renew
POST
/domain/v2beta1/domains/{domain}/enable-dnssec
GET
/domain/v2beta1/domains/{domain}/hosts
POST
/domain/v2beta1/domains/{domain}/hosts
PATCH
/domain/v2beta1/domains/{domain}/hosts/{name}
DELETE
/domain/v2beta1/domains/{domain}/hosts/{name}
POST
/domain/v2beta1/domains/{domain}/lock-transfer
POST
/domain/v2beta1/domains/{domain}/unlock-transfer
GET
/domain/v2beta1/renewable-domains
GET
/domain/v2beta1/search-domains
GET
/domain/v2beta1/tlds

Tasks

A task is an asynchronous operation perform on any type of resources (domain, zone, contact...).

GET
/domain/v2beta1/tasks
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway