API

EmailSlot

A mailbox slot in the deprecated Email API, per domain: list, create, get or refund one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /email/slots/{domain} create OK
GET /email/slots/{domain} list OK
GET /email/slots/{domain}/{slot_id} load OK
DELETE /email/slots/{domain}/{slot_id} remove Accepted

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

email_slots, err := client.EmailSlot(nil).List(map[string]any{"domain": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(email_slots)
email_slot, err := client.EmailSlot(nil).Load(map[string]any{"domain": "example", "id": 1}, nil)
if err != nil {
    panic(err)
}
fmt.Println(email_slot)
created, err := client.EmailSlot(nil).Create(map[string]any{"domain": "example", "duration": 1, "mailbox_type": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
removed, err := client.EmailSlot(nil).Remove(map[string]any{"domain": "example", "id": 1}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local email_slots, err = client:EmailSlot():list({ domain = "example" })
local email_slot, err = client:EmailSlot():load({ domain = "example", id = 1 })
local created, err = client:EmailSlot():create({ domain = "example", duration = 1, mailbox_type = "example" })
local removed, err = client:EmailSlot():remove({ domain = "example", id = 1 })

PHP

Construct client as shown in the PHP setup, then call the operations:

$email_slots = $client->EmailSlot()->list(["domain" => "example"]);
$email_slot = $client->EmailSlot()->load(["domain" => "example", "id" => 1]);
$created = $client->EmailSlot()->create(["domain" => "example", "duration" => 1, "mailbox_type" => "example"]);
$client->EmailSlot()->remove(["domain" => "example", "id" => 1]);

Python

Construct client as shown in the Python setup, then call the operations:

email_slots = client.EmailSlot().list({"domain": "example"})
email_slot = client.EmailSlot().load({"domain": "example", "id": 1})
created = client.EmailSlot().create({ "domain": "example", "duration": 1, "mailbox_type": "example" })
client.EmailSlot().remove({"domain": "example", "id": 1})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

email_slots = client.EmailSlot.list({ "domain" => "example" })
email_slot = client.EmailSlot.load({ "domain" => "example", "id" => 1 })
created = client.EmailSlot.create({ "domain" => "example", "duration" => 1, "mailbox_type" => "example" })
client.EmailSlot.remove({ "domain" => "example", "id" => 1 })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const email_slots = await client.EmailSlot().list({ domain: "example" })
const email_slot = await client.EmailSlot().load({ domain: "example", id: 1 })
const created = await client.EmailSlot().create({ domain: "example", duration: 1, mailbox_type: "example" })
await client.EmailSlot().remove({ domain: "example", id: 1 })

Fields

Field Type Required Description
autorenew boolean No Autorenew
capacity integer Yes Capacity
created_at string Yes Created At
duration integer Yes Duration
gandi_id integer Yes Gandi Id
href string Yes Href
id string Yes Id
mailbox_type string Yes Mailbox Type
refund_amount number No Refund Amount
refund_currency string No Refund Currency
refundable boolean Yes Refundable
status string Yes Status

create

POST /email/slots/{domain}

Operation ID: postEmailSlotsDomain.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
sharing_id query string No

Request body

application/json

Property Type Required Description
autorenew boolean No
duration integer Yes
mailbox_type enum: standard, premium, standard_2023, premium_2023 Yes

Responses

200: OK
202: Accepted

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

list

GET /email/slots/{domain}

Operation ID: getEmailSlotsDomain.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
display_not_expired_and_inactive query boolean No

Responses

200: OK

application/json

Property Type Required Description
[].capacity integer Yes
[].created_at string (date-time) Yes
[].href string Yes
[].id integer Yes
[].mailbox_type string Yes
[].refundable boolean Yes
[].status string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

load

GET /email/slots/{domain}/{slot_id}

Operation ID: getEmailSlotsDomainSlotId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
slot_id path integer Yes

Responses

200: OK

application/json

Property Type Required Description
capacity integer Yes
created_at string (date-time) Yes
href string Yes
id integer Yes
mailbox_type string Yes
refund_amount number No
refund_currency string No
refundable boolean Yes
status string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

remove

DELETE /email/slots/{domain}/{slot_id}

Operation ID: deleteEmailSlotsDomainSlotId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
slot_id path integer Yes

Responses

202: Accepted

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes