# Web Cloud › Email and Collaborative Solutions › Zimbra › Slots API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 2 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/slots/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/zimbra/slots.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/email-and-collaborative-solutions/zimbra/slots.json?format=openapi3

## Operations

- `GET /zimbra/platform/{platformId}/slot` — List slots
- `GET /zimbra/platform/{platformId}/slot/{slotId}` — Get a slot

## List slots

`GET /v2/zimbra/platform/{platformId}/slot`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/slots/#get-zimbra-platform-platformid-slot

**Status:** Stable production version  
**IAM actions:** `zimbra:apiovh:platform/slot/get`

Returns the account slots of the platform with their offer, billing status and linked email account. Filter them by `accountId`, `email`, `offer`, `billingStatus` or `used`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `accountId` | query | string |  | Filter by account identifier of the slots |
| `billingStatus` | query | string |  | Filter by the billing status of the slots |
| `email` | query | string |  | Filter slot by an email |
| `offer` | query | string |  | Filter by offer of the slots |
| `platformId` | path | string (uuid) | yes | Platform ID |
| `used` | query | boolean |  | Filter by the empty account id of the slots |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | zimbra.SlotResponse[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.SlotCurrentState | read-only | Object representing slot |
| `currentState.accountId` | string (uuid) | read-only | ID of the account to which the slot is tied |
| `currentState.billingStatus` | zimbra.BillingStatusEnum | read-only | Current billing status of a slot — one of `CREATING`, `DELETED`, `DELETING`, `OK`, `REOPENING`, `SUSPENDED`, `SUSPENDING`, `UPDATING` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.domainPromotionLink` | string | read-only | Domain for which the slot was given. Null when purchased separately. |
| `currentState.email` | string | read-only | Email address of the account tied to the slot |
| `currentState.offer` | zimbra.OfferEnum | read-only | Offer of the slot — one of `PRO`, `STARTER` |
| `currentState.platformId` | string (uuid) | read-only | ID of the platform to which the slot belongs |
| `currentTasks` | common.CurrentTask[] | read-only | An array containing tasks responses pending on resource extends AsyncResourceBase object |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Resource identifier in UUID representation |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Current resource status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "accountId": "00000000-0000-0000-0000-000000000000",
      "billingStatus": "CREATING",
      "createdAt": "2024-01-01T12:00:00Z",
      "domainPromotionLink": "string",
      "email": "string",
      "offer": "PRO",
      "platformId": "00000000-0000-0000-0000-000000000000"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/slot" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/zimbra/platform/{platformId}/slot")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/zimbra/platform/{platformId}/slot");

print_r($result);
?>
```

## Get a slot

`GET /v2/zimbra/platform/{platformId}/slot/{slotId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/slots/#get-zimbra-platform-platformid-slot-slotid

**Status:** Stable production version  
**IAM actions:** `zimbra:apiovh:platform/slot/get`

Returns the offer and billing status of the slot, and the email account using it. `accountId` and `email` are null while no account uses the slot.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `platformId` | path | string (uuid) | yes | Platform ID |
| `slotId` | path | string (uuid) | yes | Slot ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | zimbra.SlotResponse | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.SlotCurrentState | read-only | Object representing slot |
| `currentState.accountId` | string (uuid) | read-only | ID of the account to which the slot is tied |
| `currentState.billingStatus` | zimbra.BillingStatusEnum | read-only | Current billing status of a slot — one of `CREATING`, `DELETED`, `DELETING`, `OK`, `REOPENING`, `SUSPENDED`, `SUSPENDING`, `UPDATING` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.domainPromotionLink` | string | read-only | Domain for which the slot was given. Null when purchased separately. |
| `currentState.email` | string | read-only | Email address of the account tied to the slot |
| `currentState.offer` | zimbra.OfferEnum | read-only | Offer of the slot — one of `PRO`, `STARTER` |
| `currentState.platformId` | string (uuid) | read-only | ID of the platform to which the slot belongs |
| `currentTasks` | common.CurrentTask[] | read-only | An array containing tasks responses pending on resource extends AsyncResourceBase object |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Resource identifier in UUID representation |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Current resource status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |

```json
{
  "checksum": "string",
  "currentState": {
    "accountId": "00000000-0000-0000-0000-000000000000",
    "billingStatus": "CREATING",
    "createdAt": "2024-01-01T12:00:00Z",
    "domainPromotionLink": "string",
    "email": "string",
    "offer": "PRO",
    "platformId": "00000000-0000-0000-0000-000000000000"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/slot/{slotId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/zimbra/platform/{platformId}/slot/{slotId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/zimbra/platform/{platformId}/slot/{slotId}");

print_r($result);
?>
```
