Email API
https://api.gandi.net/v5/email
Introduction ¶
This section of our documentation will assist you in the management of Gandi email mailboxes through our API.
General information on Gandi's email services can be found in our public documentation at:
https://docs.gandi.net/en/gandimail
A mailbox is:
- attached to what we refer to as a "slot". Consequently, it is necessary to have at least one slot available before you can create a new mailbox.
- available as one of two different types: Standard (with 3GB of storage), or Premium (with 50GB of storage)
Manage your forwarding addresses ¶
https://api.gandi.net/v5/email/forwards/{domain}
get List forwarding addresses ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- domain ⁠string
Query String
Optional
- destination ⁠stringFilters the list by a destination pattern.Example:
*@toto.net
Example:john.doe@toto*
- 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. - sort_by ⁠string
One of: "source", "-source", "destination", "-destination"
Default: "source"
Result sorting field. - source ⁠stringFilters the list by a source pattern.Example:
*lice
Example:alice
- destination ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
Optional
- Accept ⁠stringWhen passed
text/csv
value, this route will return a CSV-formatted response.
- Authorization ⁠string
Responses
200
Headers
- Total-Count ⁠integerTotal number of items.
Optional
- Link ⁠stringLinks to next and last page.
- Total-Count ⁠integer
Body
application/json
⁠arrayOf items of type:
- object
With the following properties:
- destinations ⁠array[ string ]A list of email addresses.
- href ⁠stringURL to forwarding address
- source ⁠stringThe source email address.
- destinations ⁠array[ string ]
- object
text/csv
⁠anyCSV-formatted response.
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
post Create a forwarding address ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- destinations ⁠array[ string ]A list of email addresses.
- source ⁠stringThe source email address.
Example:{ "source": "alice", "destinations": [ "alice.doe@example.org", "ruth@example.org" ] }
- destinations ⁠array[ string ]
Responses
201
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Forwarding address details ¶
https://api.gandi.net/v5/email/forwards/{domain}/{source}
put Update a forwarding address ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- source ⁠string
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- destinations ⁠array[ string ]A list of email addresses.
Example:{ "destinations": [ "alice@example.org" ] }
- destinations ⁠array[ string ]
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
delete Delete a forwarding address ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- source ⁠string
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Manage your mailboxes ¶
https://api.gandi.net/v5/email/mailboxes/{domain}
get List mailboxes ¶
{domain}
.Request
URI Parameters
- domain ⁠stringDomain name.
- domain ⁠string
Query String
Optional
- <created_at ⁠datetimeSlot creation date.
- ~login ⁠stringFilters the list by a login pattern.Example:
*lice
Example:alic*
- antispam ⁠booleanAntispam is enabled or disabled
- login ⁠stringFilters the list by exact login.
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
- 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.
- <created_at ⁠datetime
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
Optional
- Accept ⁠stringWhen passed
text/csv
value, this route will return a CSV-formatted response.
- Authorization ⁠string
Responses
200
Headers
- Total-Count ⁠integerTotal number of items.
Optional
- Link ⁠stringLinks to next and last page.
- Total-Count ⁠integer
Body
application/json
⁠arrayOf items of type:
- object
With the following properties:
- address ⁠stringFull email address
- alias_count ⁠integer
Default: 0
- antispam ⁠booleanAntispam is enabled
- domain ⁠stringDomain name
- href ⁠stringLink to mailbox details
- id ⁠stringMailbox ID
- login ⁠stringMailbox login
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
- quota_used ⁠integer
Default: 0
- address ⁠string
Example:[ { "domain": "example.net", "login": "alice", "address": "alice@example.net", "id": "066743e5-96e4-4a1d-9195-8b8a700a8a79", "mailbox_type": "standard", "quota_used": 1200, "alias_count": 2, "antispam": true, "href": "https://api.test/api/v5/email/example.net/066743e5-96e4-4a1d-9195-8b8a700a8a79" } ]
- object
text/csv
⁠anyCSV-formatted response.
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
post Create a new mailbox ¶
This route creates a new mailbox for the given domain. You will have to choose a mailbox_type.
Note that before you can create a mailbox, you must have a slot available (see Slot management).
Request
URI Parameters
- domain ⁠stringDomain name.
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
Optional
- Dry-Run ⁠integerIf this header's value is
1
the request's parameters will only be checked; the operation will not actually be performed.
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- login ⁠string
Minimum length: 1
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
- password ⁠string
Minimum length: 8
Maximum length: 200
Mailbox password.
Must contain between 8 and 200 characters, containing at least 1 upper-case letter, 3 numbers, and a special character.
You can also send a hashed password in SHA512-CRYPT ie: $6$xxxx$yyyy
Optional
- aliases ⁠array
Of items of type:
- stringA local-part (what comes before the "@") of an email address. It can contain a wildcard "*" before or after at least two characters to redirect everything thats matches the local-part pattern.
- string
- antispam ⁠boolean
Default: true
Enable antispam
Example:{ "login": "alice", "mailbox_type": "standard", "password": "a*6@Xk86cPR2kcZ@qPAi", "aliases": [ "bob", "bob*" ] }
- login ⁠string
Responses
200
Dry-Run: 1
header.Headers
Optional
- Warning ⁠stringWarning message
- Warning ⁠string
Body
application/json
⁠objectWith the following properties:
- status ⁠string
One of: "success", "error"
Response status.
Optional
- errors ⁠arrayA list of all the errors encountered during validation.
Of items of type:
- object
With the following properties:
- description ⁠stringError message.
- location ⁠string
One of: "header", "path", "querystring", "body"
The field's location in the HTTP response. - name ⁠stringThe xpath of the field.
- description ⁠string
- object
- status ⁠string
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Mailbox details ¶
https://api.gandi.net/v5/email/mailboxes/{domain}/{mailbox_id}
get Retrieve a mailbox ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- mailbox_id ⁠stringMailbox ID, of type UUID
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
200
Body
application/json
⁠objectWith the following properties:
- address ⁠stringFull email address
- aliases ⁠array
Default: []
Mailbox alias listOf items of type:
- stringA local-part (what comes before the "@") of an email address. It can contain a wildcard "*" before or after at least two characters to redirect everything thats matches the local-part pattern.
- string
- antispam ⁠booleanAntispam is enabled
- domain ⁠stringDomain name
- href ⁠stringLink to mailbox details
- id ⁠stringMailbox ID
- login ⁠stringMailbox login
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
- quota_used ⁠integer
Default: 0
Optional
- alias_count ⁠integer
Default: 0
- fallback_email ⁠stringFallback email addresse
- responder ⁠object
With the following properties:
Optional
- enabled ⁠boolean
Default: false
true
if the responder is activated - ends_at ⁠datetimeresponder end date
- message ⁠stringresponder message
- starts_at ⁠datetimeresponder start date
- enabled ⁠boolean
Example:{ "domain": "mailbox-api-test-1.fr", "responder": { "message": "", "enabled": false }, "mailbox_type": "standard", "login": "alice", "quota_used": 0, "antispam": true, "aliases": [ "bob", "bob*" ], "address": "alice@example.net", "href": "https://api.test/api/v5/email/example.net/066743e5-96e4-4a1d-9195-8b8a700a8a79", "id": "066743e5-96e4-4a1d-9195-8b8a700a8a79" }
- address ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
patch Update a mailbox ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- mailbox_id ⁠stringMailbox ID, of type UUID
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Optional
- aliases ⁠array
Of items of type:
- stringA local-part (what comes before the "@") of an email address. It can contain a wildcard "*" before or after at least two characters to redirect everything thats matches the local-part pattern.
- string
- antispam ⁠booleanEnable or disable antispam
- login ⁠string
- password ⁠string
Minimum length: 8
Maximum length: 200
Mailbox password.
Must contain between 8 and 200 characters, containing at least 1 upper-case letter, 3 numbers, and a special character.
You can also send a hashed password in SHA512-CRYPT ie: $6$xxxx$yyyy
- responder ⁠object
With the following properties:
Optional
- enabled ⁠boolean
Default: false
true
if the responder is activated - ends_at ⁠datetimeresponder end date
- message ⁠stringresponder message
- starts_at ⁠datetimeresponder start date
- enabled ⁠boolean
Example - Update a mailbox password:{ "password": "lGv6KLZhbCgcX8pMK9Vx6mqrZC8vk84L" }
Example - Activate responder:{ "responder": { "enabled": true, "message": "Out of office", "starts_at": "2019-07-10T18:00:01Z", "ends_at": "2019-07-26T09:00:01Z" } }
Example - Setup aliases:{ "aliases": [ "bob", "bob*" ] }
- aliases ⁠array
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
delete Delete a mailbox ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- mailbox_id ⁠stringMailbox ID, of type UUID
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Mailbox content management ¶
https://api.gandi.net/v5/email/mailboxes/{domain}/{mailbox_id}/contents
delete Purge a mailbox ¶
Request
URI Parameters
- domain ⁠stringDomain name.
- mailbox_id ⁠stringMailbox ID, of type UUID
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Mailbox type management ¶
https://api.gandi.net/v5/email/mailboxes/{domain}/{mailbox_id}/type
patch Upgrade or downgrade a mailbox offer ¶
This method lets you upgrade or downgrade a mailbox offer.
If you choose to upgrade, you will be charged for the remaining time of the offer, with an updated price. If you downgrade, you will get a refund.
Request
URI Parameters
- domain ⁠stringDomain name.
- mailbox_id ⁠stringMailbox ID, of type UUID
- domain ⁠string
Query String
Optional
- sharing_id ⁠stringSharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
- sharing_id ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
Optional
- Dry-Run ⁠integerIf this header's value is
1
the request's parameters will only be checked; the operation will not actually be performed.
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
New mailbox type
Example - Upgrade:{ "mailbox_type": "premium" }
Example - Downgrade:{ "mailbox_type": "standard" }
- mailbox_type ⁠string
Responses
200
Dry-Run: 1
header.Headers
Optional
- Warning ⁠stringWarning message
- Warning ⁠string
Body
application/json
⁠objectWith the following properties:
- status ⁠string
One of: "success", "error"
Response status.
Optional
- errors ⁠arrayA list of all the errors encountered during validation.
Of items of type:
- object
With the following properties:
- description ⁠stringError message.
- location ⁠string
One of: "header", "path", "querystring", "body"
The field's location in the HTTP response. - name ⁠stringThe xpath of the field.
- description ⁠string
- object
- status ⁠string
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Migrate from packmail to the new mailbox offer ¶
https://api.gandi.net/v5/email/migration/{domain}
get Show migration details ¶
token
. This route returns the count of standard (3GB), standard_new (10GB), premium (50GB) and premium_new (50GB) purchased mailboxes. Also returns the count of mailboxes included
with the domain and free
.Request
URI Parameters
- domain ⁠string
Query String
Optional
- sharing_id ⁠stringSharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
- sharing_id ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
200
Body
application/json
⁠objectWith the following properties:
- currency ⁠stringCurrency used.
- forward_count ⁠integerTotal number of forwards.
- free_mailboxes ⁠integerTotal number of free mailboxes.
- included_mailboxes ⁠integerTotal number of included mailboxes (offered with the domain).
- info ⁠arrayDetails of the mailbox migration.
Of items of type:
- object
With the following properties:
- login ⁠stringEmail login.
- offer_v2 ⁠stringMailbox type, it could be standard (3Gb), standard_new (10 Gb), premium (50Gb) or premium_new (50Gb).
- price_v2 ⁠numberYearly mailbox price.
- price_v2_m ⁠numberMonthly mailbox price.
- quota ⁠numberQuota of the mailbox before migration.
- quota_v2 ⁠numberQuota of the mailbox after migration.
- usage ⁠numberQuota used.
- login ⁠string
- object
- packmail ⁠booleanReturn True if the offer is still packmail.
- price_v1 ⁠numberTotal price before mailbox migration.
- price_v2 ⁠numberTotal price after mailbox migration.
- quota_v1 ⁠numberQuota before mailbox migration.
- token ⁠stringThe token needed to migrate.
- usage_v1 ⁠numberQuota used.
Example:{ "packmail": true, "included_mailboxes": 5, "free_mailboxes": 2, "forward_count": 0, "info": [ { "login": "mb1", "offer_v2": "standard", "price_v2": 4.2, "price_v2_m": 0.35, "quota": 0, "usage": 2097152, "quota_v2": 3145728 } ], "currency": "EUR", "price_v1": 12, "price_v2": 4.2, "quota_v1": 3145728, "usage_v1": 1887436, "token": "fa647dadedaeae4e6a3551e16907f36abe029ddc" }
- currency ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
post Launch migration ¶
token
to launch the mail migration, use GET /migration/{domain}
to retrieve the token
.Request
URI Parameters
- domain ⁠string
Query String
Optional
- sharing_id ⁠stringSharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
- sharing_id ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- token ⁠stringThe token needed to migrate.
Example:{ "token": "fa647dadedaeae4e6a3551e16907f36abe029ddc" }
- token ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Offer details ¶
https://api.gandi.net/v5/email/offers/{domain}
get Retrieve current email offer ¶
Request
URI Parameters
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
200
Body
application/json
⁠objectWith the following properties:
- antispam ⁠string
One of: "active", "inactive", "mixed"
Antispam status on the domain. Note that amixed
value means that some mailboxes use the antispam while others don't. - dkim ⁠string
One of: "active", "inactive"
DKIM status on the domain. - status ⁠string
One of: "active", "inactive"
Offer status - version ⁠integer
One of: 1, 2
Offer version
Example:{ "status": "active", "version": 2, "antispam": "active", "dkim": "active" }
- antispam ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
patch Update global email options ¶
Request
URI Parameters
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- antispam ⁠string
One of: "active", "inactive"
Enable or disable the antispam at the domain's level. - dkim ⁠string
One of: "active", "inactive"
Enable or disable DKIM on this domain.
- antispam ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Manage slots ¶
https://api.gandi.net/v5/email/slots/{domain}
get List existing mailbox slots ¶
{domain}
.Request
URI Parameters
- domain ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
200
Headers
- Total-Count ⁠integerTotal number of items.
- Total-Count ⁠integer
Body
application/json
⁠arrayOf items of type:
- object
With the following properties:
- capacity ⁠integerSlot capacity (in MB).
- created_at ⁠datetimeSlot creation date.
- href ⁠stringLink to slot details
- id ⁠integerSlot ID.
- mailbox_type ⁠stringType of mailbox this slot can handle.
- refundable ⁠boolean
true
if this slot is refundable - status ⁠stringSlot status.
- capacity ⁠integer
Example:[ { "status": "inactive", "capacity": 3072, "mailbox_type": "standard", "refundable": false, "id": 123, "href": "https://api.test/v5/email/slots/mailbox-api-test-1.fr/123", "created_at": "2019-01-15T13:20:01Z" }, { "status": "active", "capacity": 3072, "mailbox_type": "standard", "refundable": false, "id": 124, "href": "https://api.test/v5/email/slots/mailbox-api-test-1.fr/124", "created_at": "2019-01-15T13:20:01Z" } ]
- object
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
post Create a new mailbox slot ¶
Request
URI Parameters
- domain ⁠string
Query String
Optional
- sharing_id ⁠stringSharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
- sharing_id ⁠string
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Body
application/json
⁠objectWith the following properties:
Required
- mailbox_type ⁠string
One of: "standard", "premium", "standard_new", "premium_new"
Type of mailbox this slot can handle.
Example:{ "mailbox_type": "standard" }
- mailbox_type ⁠string
Responses
200
Headers
- Total-Count ⁠integerTotal number of items.
- Total-Count ⁠integer
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Slot details ¶
https://api.gandi.net/v5/email/slots/{domain}/{slot_id}
get Get slot details ¶
Request
URI Parameters
- domain ⁠string
- slot_id ⁠integerSlot ID.
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
200
Body
application/json
⁠objectWith the following properties:
- capacity ⁠integerSlot capacity (in MB).
- created_at ⁠datetimeSlot creation date.
- href ⁠stringLink to slot details
- id ⁠integerSlot ID.
- mailbox_type ⁠stringType of mailbox this slot can handle.
- refundable ⁠boolean
true
if this slot is refundable - status ⁠stringSlot status.
Optional
- refund_amount ⁠numberRefunded amount if you delete this slot now.
- refund_currency ⁠stringRefund currency.
Example:{ "status": "inactive", "capacity": 51200, "refund_amount": 16.16, "mailbox_type": "premium", "refundable": true, "refund_currency": "EUR", "id": 125, "href": "http://api.test/v5/email/slots/mailbox-api-test-1.fr/125", "created_at": "2019-04-08T08:48:41Z" }
- capacity ⁠integer
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
delete Refund a slot ¶
Request
URI Parameters
- domain ⁠string
- slot_id ⁠integerSlot ID.
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string
Responses
202
Headers
Optional
- Location ⁠string
Body
application/json
⁠objectWith the following properties:
- message ⁠stringConfirmation message.
- message ⁠string
403
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
401
Body
application/json
⁠objectWith the following properties:
- cause ⁠string
- code ⁠integer
- message ⁠string
- object ⁠string
Secured by
Authentication with API Key
Headers
Required
- Authorization ⁠stringThe
Authorization
header must start withApikey
, followed by the user's API Key.Example:Apikey your-api-key
- Authorization ⁠string