Organization API

https://api.sandbox.gandi.net/v5/organization

Gandi Organization API

Introduction

This section of our documentation explains how to view information on organizations at Gandi.net through our REST API. Organizations are used to share products via user accounts.

All organization management must be performed via our web interface:
https://admin.gandi.net/organizations/

General information on using organizations at Gandi can be found in our public documentation at:
https://docs.gandi.net/en/sharing_products/index.html

Renew a Personal Access Token (PAT)

https://api.sandbox.gandi.net/v5/organization/access-tokens

post Renew the current personal access token

This route is used to generate a new token from the given one, it will copy the current scopes of the token. An optional name can be passed to rename the token, otherwise the same name is also copied. An optional expiration date can be passed to override the current TTL of the token. Note that renewing a token will not make the previous token expire.

Request

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Optional
    • expires_at ⁠string
      New expiration date. By default, the same TTL as the current PAT is applied.
    • name ⁠string
      New name for the token.
    Example:
    {
      "name": "Certbot"
    }

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • access_token ⁠string
      the secret token that should be saved safely.
    • entities ⁠array
      scoped entities of the token

      Of items of type:

      • object

        With the following properties:

        • id ⁠string
          Unique identifier of the scoped entity.
        • name ⁠string
          Name of the scoped entity.
        • type ⁠string
          Type of the scoped entity.
    • expires_at ⁠datetime
      expiration date of the new token
    • id ⁠string
      ID of the Personal Access Token.
    • name ⁠string
      human readable name of the Personal Access Token.
    • scopes ⁠array[ string ]
      scopes of the token

201

The resource has been created.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Organization Management

https://api.sandbox.gandi.net/v5/organization/organizations

get List organizations

This route returns a list of organizations the authenticated user has permission to access.

Request

Query String
  • Optional
    • ~name ⁠string
      Filters the list by a name pattern.
      Example: *lice
      Example: alic*
    • name ⁠string
      Filters the list by exact name.
    • permission ⁠string
      Filters the list by the permission the authenticated user has on that organization and products in it.
    • sort_by ⁠string

      One of: "name", "type", "id"

      Default: "name"

      Used to specify how you want the results sorted.
    • type ⁠string

      One of: "individual", "company", "association", "publicbody"

      Filters the list by type of organization.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠array

    Of items of type:

    • object

      With the following properties:

      • id ⁠string
        The main identifier of the organization. Also known as sharing_id in many routes.
      • name ⁠string
        Unique name of the organization.
      Optional
      • corporate ⁠boolean
        Flag to indicate the corporate status for the organization.
      • email ⁠string
        The email address of the organization.
      • firstname ⁠string
        The first name of the organization.
      • lastname ⁠string
        The last name of the organization.
      • orgname ⁠string
        The company, association, or public body name of the (non-individual) organization.
      • reseller ⁠boolean
        Flag to indicate the reseller status for the organization.
      • siren ⁠string
        The siren number of the (non-individual) organization.
      • type ⁠string
        The type of the organization.
      • vat_number ⁠string
        The VAT number of the (non-individual) organization.
    Example:
    [
      {
        "name": "alice",
        "firstname": "Alice",
        "lastname": "Doe",
        "id": "80548b45-e18d-4cab-adef-e10a8406de4a",
        "reseller": false,
        "corporate": true,
        "type": "individual",
        "email": "alice@example.net"
      },
      {
        "name": "bob",
        "firstname": "Bob",
        "orgname": "Bob's Roads",
        "lastname": "Doe",
        "email": "bob@example.net",
        "reseller": false,
        "corporate": false,
        "type": "publicbody",
        "id": "e1ab1204-e638-4fd8-85a4-34dd95013cdc"
      },
      {
        "name": "ron",
        "firstname": "Ron",
        "orgname": "Ron Inc.",
        "lastname": "Doe",
        "email": "ron@example.net",
        "reseller": false,
        "corporate": false,
        "type": "company",
        "id": "b018061c-a4e3-4d6d-8445-e3837bd23815"
      }
    ]

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

post Create an organization

This route is used to create an organization such as company, association, or public body.

Request

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • city ⁠string
      the city name of the address.
    • email ⁠string
      The email address of the organization.
    • firstname ⁠string
      The first name of the organization.
    • lastname ⁠string
      The last name of the organization.
    • name ⁠string
      Unique name of the organization.
    • orgname ⁠string
      The company, association, or public body name of the organization.
    • phone ⁠string
      phone number.
    • streetaddr ⁠string
      the street address of the organization.
    • type ⁠string

      One of: "company", "association", "publicbody"

      The type of the organization.
    Optional
    • country ⁠string
      country ISO code of the address.
    • fax ⁠string
      fax number.
    • lang ⁠string
      language of the organization for emails.
    • reference ⁠string
      Optional text to display on the invoice, such as your own reference info.
    • reseller ⁠boolean
      Flag to set the organization as reseller.
    • siren ⁠string
      The siren number of the organization.
    • state ⁠string
      state ISO code of the address.
    • streetaddr2 ⁠string
      additional street address info of the organization.
    • vat_number ⁠string
      The VAT number of the organization.
    • zip ⁠string
      zip code of the address.
    Example:
    {
      "type": "company",
      "name": "Poppy Red LLC",
      "firstname": "John",
      "lastname": "Do",
      "orgname": "Poppy Red LLC",
      "email": "jd@example.net",
      "streetaddr": "42 Rue du Soleil Levant",
      "zip": "17000",
      "city": "La Rochelle",
      "country": "FR",
      "state": "FR-NAQ",
      "phone": "+33.612345678",
      "reseller": false
    }

Responses

201

The resource has been created.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • id ⁠string
      Created Organization ID.
    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

/v5/organization/organizations/{org_id}

https://api.sandbox.gandi.net/v5/organization/organizations/{org_id}

get Show organization information

This route returns the information of the organization with the given ID.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • city ⁠string
      the city name of the address.
    • corporate ⁠boolean
      Flag set for corporate organization.
    • country ⁠string
      country ISO code of the address.
    • email ⁠string
      the email address of the organization.
    • firstname ⁠string
      the first name of the organization.
    • id ⁠string
      the sharing id of the organization.
    • lastname ⁠string
      the last name of the organization.
    • name ⁠string
      the sharing name of the organization.
    • reseller ⁠boolean
      Flag set for reseller organization.
    • streetaddr ⁠string
      the street address of the organization.
    • type ⁠string

      One of: "individual", "company", "association", "publicbody"

      the type of the organization.
    • zip ⁠string
      zip code of the address.
    Optional
    • fax ⁠string
      fax number.
    • lang ⁠string
      language used to send emails to the organization.
    • orgname ⁠string
      organization legal name.
    • phone ⁠string
      phone number.
    • reference ⁠string
      Optional text to display on the invoice, such as your own reference info.
    • state ⁠string
      state ISO code of the address.
    • streetaddr2 ⁠string
      additional street address info of the organization.
    • vat_number ⁠string
      The VAT number of the organization.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

patch Update an organization

This route updates the information of the organization of the given ID.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Optional
    • city ⁠string
      the city name of the address.
    • country ⁠string
      country (ISO 3166-1 alpha-2) code of the address.
    • email ⁠string
      The email address of the organization.
    • fax ⁠string
      fax number.
    • firstname ⁠string
      The first name of the organization.
    • lang ⁠string

      One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

      language code of the organization for emails.
    • lastname ⁠string
      The last name of the organization.
    • name ⁠string
      Unique name of the organization.
    • phone ⁠string
      phone number.
    • reference ⁠string
      Optional text to display on the invoice, such as your own reference info.
    • reseller ⁠boolean
      Set the organization as reseller if true, cannot be set to false.
    • siren ⁠string
      The siren number of the organization.
    • state ⁠string
      Country subdivisions(ISO 3166-2) of the address.
    • streetaddr ⁠string
      the street address of the organization.
    • streetaddr2 ⁠string
      additional street address info of the organization.
    • vat_number ⁠string
      The VAT number of the organization.
    • zip ⁠string
      zip (postal) code of the address.

Responses

202

The request has been accepted.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

delete Delete an organization

This route deletes an organization if possible. If an organization owns a product or has money on its prepaid account, it cannot be deleted.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

204

The request has succeeded but does not need to return a response.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

409

The request could not be completed due to a conflict with the current state of the target resource.
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Explanation message.

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Actions on organization customers

https://api.sandbox.gandi.net/v5/organization/organizations/{org_id}/action

post

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • action ⁠string

      One of: "release_resellee"

    • params ⁠object

      With the following properties:

      Required
      • id ⁠string
        Identifier of the customer to release
    Example:
    {
      "action": "release_resellee",
      "params": {
        "id": "000000000000-0000-0000-0000-000000000000"
      }
    }

Responses

201

The resource has been created.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

202

Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Accepted.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Management Of Customers Under a Reseller Organization

https://api.sandbox.gandi.net/v5/organization/organizations/{org_id}/customers

When an organization is flagged reseller, then the product is not legally owned by the organization, but by the organization's customers.

get List customers

This route returns the list of customers of the given reseller organization.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Query String
  • Optional
    • name ⁠string
      Filters the list by name, with optional patterns.
      Example: *lice
      Example: alic*
    • page ⁠integer

      Default: 1

      Minimum: 1

      Which result page to retrieve. If the number is greater than the last page, an empty list is returned.
    • per_page ⁠integer

      Minimum: 1

      How many items to display per page.
    • permission ⁠string
      Filters the list by the permission the authenticated user has on that organization and products in it.
    • sort_by ⁠string

      One of: "name", "type", "id"

      Default: "name"

      Used to specify how you want the results sorted.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Headers
    • Filtered-Count ⁠integer
      Number of items returned by the API call.
    • Total-Count ⁠integer
      Total number of items.
    Optional
    • Link ⁠string
      Links to next and last page.
Body
  • application/json
    ⁠array

    Of items of type:

    • object

      With the following properties:

      • email ⁠string
        Email of the customer.
      • firstname ⁠string
        First name of the customer.
      • id ⁠string
        The main identifier of the customer. Also known as sharing_id in many routes.
      • lastname ⁠string
        Last name of the customer.
      • name ⁠string
        Name of the customer.
      • type ⁠string

        One of: "individual", "company", "association", "publicbody"

        Type of the customer organization.
      Optional
      • orgname ⁠string
        Organization legal name of the customer.
    Example:
    [
      {
        "id": "80548b45-e18d-4cab-adef-e10a8406de4a",
        "name": "alice",
        "firstname": "Alice",
        "lastname": "Doe",
        "type": "individual",
        "email": "alice@example.net"
      },
      {
        "id": "e1ab1204-e638-4fd8-85a4-34dd95013cdc",
        "name": "bob",
        "firstname": "Bob",
        "lastname": "Doe",
        "type": "publicbody",
        "orgname": "Bob's Roads",
        "email": "bob@example.net"
      },
      {
        "id": "b018061c-a4e3-4d6d-8445-e3837bd23815",
        "name": "ron",
        "firstname": "Ron",
        "lastname": "Doe",
        "type": "company",
        "orgname": "Ron Inc.",
        "email": "ron@example.net"
      }
    ]

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

post Create a new customer

This route is used to create a new customer.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • city ⁠string
    • country ⁠string
      Country code.
    • email ⁠string
    • firstname ⁠string
      First name.
    • lastname ⁠string
      Last name.
    • phone ⁠string
    • streetaddr ⁠string
      Street address.
    • type ⁠string

      One of: "individual", "company", "association", "publicbody"

      Type of the customer organization.
    Optional
    • fax ⁠string
    • orgname ⁠string
      Organization legal name.
    • reference ⁠string
      Optional text to display on the invoice, such as your own customer reference info.
    • state ⁠string
      State/Province/Region.
    • streetaddr2 ⁠string
      Apt. number, suite, building, etc.
    • zip ⁠string
    Example:
    {
      "type": "company",
      "firstname": "John",
      "lastname": "Do",
      "orgname": "R&D",
      "email": "jd@example.net",
      "streetaddr": "21 jump street",
      "streetaddr2": "Appt31",
      "zip": "17137",
      "city": "Nieul-sur-mer",
      "country": "FR",
      "state": "FR-NAQ",
      "phone": "+33.612345678",
      "fax": "+33.612345699",
      "reference": "abc/3458"
    }

Responses

201

The resource has been created.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • id ⁠string
      Created customer ID.
    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Management Of A Customer Under a Reseller Organization

https://api.sandbox.gandi.net/v5/organization/organizations/{org_id}/customers/{id}

get Show customer's information

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
    • id ⁠string
      Customer ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • city ⁠string
      the city name of the address.
    • country ⁠string
      country ISO code of the address.
    • email ⁠string
      Email of the customer.
    • firstname ⁠string
      First name of the customer.
    • id ⁠string
      The main identifier of the customer. Also known as sharing_id in many routes.
    • lastname ⁠string
      Last name of the customer.
    • name ⁠string
      Name of the customer.
    • streetaddr ⁠string
      the street address of the user.
    • type ⁠string

      One of: "individual", "company", "association", "publicbody"

      Type of the customer organization.
    Optional
    • fax ⁠string
      fax number.
    • orgname ⁠string
      Organization legal name of the customer.
    • phone ⁠string
      phone number.
    • reference ⁠string
      Optional text to display on the invoice, such as your own customer reference info.
    • state ⁠string
      state ISO code of the address.
    • streetaddr2 ⁠string
      additional street address info of the user.
    • zip ⁠string
      zip code of the address.
    Example:
    {
      "id": "80548b45-e18d-4cab-adef-e10a8406de4a",
      "name": "alice",
      "firstname": "Alice",
      "lastname": "Doe",
      "type": "individual",
      "email": "alice@example.net",
      "streetaddr": "5000 Fraise",
      "zip": "17540",
      "city": "Les Rivieres d'Anais",
      "country": "FR"
    }

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

patch Update customer's information

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
    • id ⁠string
      Customer ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Optional
    • city ⁠string
      the city name of the address.
    • country ⁠string
      country (ISO 3166-1 alpha-2) code of the address.
    • email ⁠string
      The email address of the customer.
    • fax ⁠string
      fax number.
    • firstname ⁠string
      The first name of the customer; clients with type 'individual' cannot update their firstname.
    • lang ⁠string

      One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

      language code of the organization for emails.
    • lastname ⁠string
      The last name of the customer; clients with type 'individual' cannot update their lastname.
    • phone ⁠string
      phone number of the customer.
    • reference ⁠string
      reference field written on every invoice.
    • siren ⁠string
      The siren number of the organization.
    • state ⁠string
      Country subdivisions (ISO 3166-2) of the address.
    • streetaddr ⁠string
      the street address of the customer.
    • streetaddr2 ⁠string
      additional street address info of the customer.
    • sync_contact_email ⁠string

      One of: "never", "match", "always"

      If the customer owns domains, the update of the email can automatically propagate the update of the email of the owners of domains. By default, the change is not propagated. If 'match' is chosen, the domains' owners that have the same email are updated, if 'always' is chosen, then the email is always updated.
    • vat_number ⁠string
      The VAT number of the organization.
    • zip ⁠string
      zip (postal) code of the address.
    Example:
    Update email with domain owners email
    {
      "email": "hello@example.net",
      "sync_contact_email": "match"
    }
    Example:
    Update the reference of the customer
    {
      "reference": "POPPYRED500"
    }

Responses

202

The request has been accepted.
Headers
  • Optional
    • Location ⁠string
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

delete Delete customer

This route deletes a customer if possible. If an customer owns a product, it cannot be deleted.

Request

URI Parameters
    • org_id ⁠string
      Organization ID.
    • id ⁠string
      Customer ID.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

204

The request has succeeded but does not need to return a response.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

409

The request could not be completed due to a conflict with the current state of the target resource.
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Explanation message.

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Authenticated User Information

https://api.sandbox.gandi.net/v5/organization/user-info

get Get user information

This route returns information on the current authenticated user.

Request

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • city ⁠string
      the city name of the address.
    • email ⁠string
      the email address of the user.
    • id ⁠string
      the sharing id of the user.
    • lang ⁠string
      language used by the user.
    • name ⁠string
      the sharing name of the user.
    • username ⁠string
      the username of the user.
    Optional
    • country ⁠string
      country ISO code of the address.
    • fax ⁠string
      fax number.
    • firstname ⁠string
      the first name of the user.
    • lastname ⁠string
      the last name of the user.
    • phone ⁠string
      phone number.
    • state ⁠string
      state ISO code of the address.
    • streetaddr ⁠string
      the street address of the user.
    • streetaddr2 ⁠string
      additional street address info of the user.
    • zip ⁠string
      zip code of the address.
    Example:
    {
      "id": "ebfcd3cd-e014-4a3d-8216-6e342f227c3d",
      "username": "alice",
      "email": "alice@example.org",
      "name": "alice",
      "firstname": "Alice",
      "lastname": "Doe",
      "streetaddr": "5 rue neuve",
      "zip": "75001",
      "city": "Paris",
      "state": "FR-IDF",
      "country": "FR",
      "phone": "+33.123456789",
      "lang": "en"
    }

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key