An exhaustive, free, and secure API for the management of your Gandi products

Simplify the management of your products at Gandi thanks to our REST API. Accessible through detailed documentation, it is your ally to perform actions in bulk, and that can be automated, on our products and services.

Domain names, DNS, web hosting, email, and SSL certificates managed automatically

Thanks to a system of permissions available via our API, recover your personal API key and let your collaborators work within the limits of their roles. Teamwork and security are guaranteed.

It is really easy to use. Here are some examples.

Access via your domain name

Access your self-hosted server at home through your domain name

Thanks to our API, you can automatically update the IP address of your router so that the server you host at home will always be available through your domain name.

Like this, you can always be sure to have access to your personal services at home by connecting to them through your domain name (ex. myserver.example.net), whether it be your RasberryPI, your alarm system or home automation systems.

# Update a DNS record with an new IP address

$ curl --request PUT
  --url https://api.gandi.net/api/v5/domains/example.net/records/mybox/A \
  --header "authorization: Apikey ${API_KEY}" \
  --header 'content-type: application/json' \
  --data "{ \"rrset_ttl\": 300, \"rrset_values\": [\"1.2.3.4\"] }"

Monitor the upcoming expiration dates of domain names

Monitor the upcoming expiration dates of domain names

Gandi already sends out email reminders starting from 60 days before the expiration date.

However, you can make your own notifications in order to add them to a validation workflow, send them to another collaborative work environment shared by a team, or even send them to your smartphone in order to not run the risk of the alerts being flagged as spam.

You won't ever forget to renew a domain name because the expiration notifications were treated as spam. Or to worry even less about this point, activate automatic renewal, which is also possible via the API!

# List expiration dates of all your domains, every day.

# 1. List all your domains names
$ curl --request GET
  --url  https://api.gandi.net/v5/domain/domains
  --header "authorization: Apikey ${API_KEY}" |  jq -r .[].fqdn

# 2. Retrieve a specific domain name's expiration date
$ curl  --request GET
  --url https://api.gandi.net/v5/domain/domains/example.net
  --header "authorization: Apikey ${API_KEY}"  | jq -r .dates.registry_ends_at

Personalize DNS zone modification notifications

Personalize DNS zone modification notifications

In a professional context with sensitive domain names, it might be pertinent to have an automatic monitoring of zone modifications.

This will allow you to:

  • Monitor your changes from your own tools in order to easily correlate them with other events
  • Automatically alert the other teams, such as the security team, of modifications so that they can perform verifications on the new server, or the communications team, for example.
  • Detect possible errors such as having deleted one line too many.
# 1.  At regular intervals, retrieve the content a DNS zone

$ curl --request GET
 --url https://api.gandi.net/api/v5/domains/example.net/records
  --header 'accept: text/plain'
  --header "authorization: Apikey ${API_KEY}" > ma.zone

# 2. Compare zone records over time to see if changes have been made within the given interval

# 3. Receive notifications of changes that have been made

Automate your website deployment.

Automate your website deployment

The public API allows you to make the deployment of a vhost as well as the generation of the TLS/SSL certificate automatic. You can also integrate the deployment of an internet website for yourself or one of your customers into your automated processes.

# List your Web Hosting instances

curl -X GET \
  https://api.gandi.net/v5/simplehosting/instances \
  -H 'authorization: Apikey YOUR-API-KEY'

# Create a Wordpress website on a web Hosting instance

curl -X POST \
  https://api.gandi.net/v5/simplehosting/instances/<;instance_id>/vhosts \
  -H 'authorization: Apikey YOUR-API-KEY' \
  -H 'content-type: application/json' \
  -d '{"fqdn":"your.fqdn.tld", \
       "linked_dns_zone":{"allow_alteration":"True"}, \
       "application":{"name":"wordpress"}}'

Gandi for resellers: integrate Gandi's API directly with your tools

  • Are you in charge of managing your customers' products?

    Rapidly perform all the orders essential to a domain names' life cycle: creation, renewal, transfer, contact creation, management of servers and DNS zones...

  • Are your customers autonomous?

    Our API allows for a complete and transparent integration of Gandi's services with your design and your platform. Boost your product catalog to offer a complete ecosystem with your brand and guarantee the fidelity of your customers.

  • Benefit from our white label interface

    Our white label tool allows your customers to easily manage their DNS zones and web forwarding via personalized, secure, and easy-to-use interface. Contact our Corporate Services team for more information.

Here are some examples for easy management.

Manage your domain name tags via our API

Manage domain name tags via our API

Create, modify, add, or delete tags on domain names to make managing them easy. Do you want to identify the domains you registered defensively to prevent someone else from using your brand name? Just select the "defensive registration" tag.

$ curl --request POST
  --url https://api.gandi.net/v5/domain/domains/{domain}/tags
  --header "authorization: Apikey XXXXX"
  --header 'content-type: application/json'
  --data "{\"tag\": \"defensive registration\"}"

Resend reachability checks with one command

Resend email verification requests with one command

In the event that your customers did not receive/see/validate the email verification requests that were sent to them, you can resend them with just one command.

$ curl --request PATCH
  --url https://api.gandi.net/v5/domain/domains/DOMAIN/reachability
  --header "authorization: Apikey XXXXX"
  --header 'content-type: application/json'
  --data '{"action":"resend"}'

GandiCloud VPS API: move to infra-as-code

Keep your usual way of doing things and use your own tools for the configuration of your GandiCloud VPS servers.

Being able to use Openstack for the configuration and delivery of our VPS servers is truly practical for your daily needs.

  • Each server and GandiCloud resource may be deployed and piloted from the public Openstack API, as you already know it. Like this, you can continue to use it in the same way as with your private cloud infrastructure.
  • You are also free to use the same deployment and infrastructure controls that you have put in place with other cloud providers such as Terraform, Ansible, Cloudinit, or Puppet.
  • The GandiCloud public VPS API offers you the possibility of managing your servers and your infrastructure, in infra-as-code mode, by using your usual server management tools.

Automatically deploy the Jitsi video conference application with the help of Terraform and Cloudinit

Automatically deploy the Jitsi video conference application with the help of Terraform and Cloudinit

By using Terraform and Cloudinit, it just takes 5 minutes to install the video conference tool on a GandiCloud server:

  1. Automatic deployment of the server via Terraform
  2. Generation of the SSL certificate and modification of the DNS zone via Terraform
  3. Automatic download and installation of Jitsi on the server thanks to Cloudinit
# main.tf terraform file extract

# GandiCloud VPS V-R2 server creation
resource "openstack_compute_instance_v2" "jitsi" {
  name = "jitsi"
  key_pair = openstack_compute_keypair_v2.jitsi-keypair.name
  flavor_name = "V-R2"
  security_groups = ["default"]
  power_state = "active"
  network {
    name = "public"
  }
  user_data = "${data.template_file.user_data.rendered}"
  block_device {
    uuid = "47edd0a0-23ce-4ce5-9168-36de68990d1b"
    source_type           = "image"
    volume_size           = 25
    boot_index            = 0
    destination_type      = "volume"
    delete_on_termination = true
  }

Our VPS servers are reliable and up-to-date to host all your applications

Discover the GandiCloud VPS servers

Why use Gandi's API?

  • A reliable test environment

    Safely test many of our API operations thanks to our v5 sandbox.

  • Around-the-clock service

    Our in-house technical experts can help you in 6 languages, and are located on 3 continents, to be by your side if you need assistance.

  • Customer experience is valued

    Your feedback is precious and a source of product improvements. How do you use our API? Write to us!

Frequently asked questions

An API, or "application programming interface," is a set of rules that will allow software to easily communicate and exchange data, bilaterally.

Using an API means saving time, since, for any given program or service, data teams no longer need to develop their own application, but can just use the API associated with it. That's why APIs are now essential in all areas of online business.

For example, using the Gandi API, you can automate information processing by automatically exchanging data with Gandi's servers, and thereby automating the management of your domain names, web hosting or even email accounts.

The Gandi API is a RESTful API utilizing both HTTPS protocol and JSON. To date, these are the most widely used standard for APIs.

All documentation on API features and implementation of our API is available at https://api.gandi.net/docs/.

The Gandi API simplifies the management of your products. It allows you to very easily create custom applications that enable you to perform actions related to your Gandi services.
The objective is to automate a large number of potential actions across all products and services:

Concretely, the API is your partner in executing very easy, repetitive (or a large number of) tasks that would be difficult to complete manually using the classic web interface.

Get help

News and articles

See all

Subscribe to the Gandi API Newsletter

A dedicated email to know about important updates related to the public API. Stay informed about API enhancements and features updates.

Invalid registration

Confirmation email sent

Please check your mailbox in order to confirm your subscription.

Chat with us

The chat tool requires accepting cookies.

The chat tool requires cookies to function properly. You can see the details of the cookies used in our privacy and cookie use policy.

Accept them to continue or use our support form if you refuse them.