This is a Ruby interface to the Gandi XML-RPC API.


Add to your Gemfile:

“by gem ‘gandi’

Then bundle install.


“sh gem install gandi

Basic Usage

Every call to the Gandi API is authenticated so sessions are required to have a unique API key. If you don’t have it already, you can retrieve your API key from your Gandi account page.

“by require ‘gandi’

api =“24-character API key”) # Endpoint:

api.domain.list‘’) api.catalog.list(product: ‘domains’) …

Operational Test and Evaluation (OT&E) Endpoint

Alongside the production API, Gandi provides an Operational Test and Evaluation (OT&E) system.

“by require ‘gandi’

api =“24-character API key”, env: :test)

api.domain.list …

For further information see the Gandi API documention at

Fault codes

When the XMLRPC call returns an error, an exception is raised. Gandi::DataError is raised if the error is due to faulty user input and Gandi::ServerError is raised if it is caused by a server-side internal error.

All the possible fault codes can be found in Gandi API manual.

Both exceptions contain a Gandi::FaultCode object which stores the object name and the cause of the error:

“by fault_code = Gandi::FaultCode.parse(505237)

=> #Gandi::FaultCode::Data:...


=> :object_fqdn


=> :cause_badparameter


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request