# Web Cloud › Email and Collaborative Solutions › Zimbra › Organizations 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

> 5 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/organizations/

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

## Operations

- `GET /zimbra/platform/{platformId}/organization` — List organizations
- `GET /zimbra/platform/{platformId}/organization/{organizationId}` — Get an organization
- `POST /zimbra/platform/{platformId}/organization` — Create an organization
- `DELETE /zimbra/platform/{platformId}/organization/{organizationId}` — Delete an organization
- `PUT /zimbra/platform/{platformId}/organization/{organizationId}` — Update an organization

## List organizations

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

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

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

Returns the organizations of the platform with their current state. Filter them by `organizationName`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `organizationName` | query | string |  | Filter by organization name |
| `platformId` | path | string (uuid) | yes | Platform ID |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.OrganizationCurrentState | read-only | Object representing organization |
| `currentState.accountsStatistics` | zimbra.OfferStatistics[] | read-only | Statistics of accounts on the organization |
| `currentState.accountsStatistics[].availableAccountsCount` | integer | read-only | Total number of accounts on this offer that can be configured |
| `currentState.accountsStatistics[].configuredAccountsCount` | integer | read-only | Number of accounts on the offer that are configured |
| `currentState.accountsStatistics[].offer` | zimbra.OfferEnum | read-only | Commercial name of the offer — one of `PRO`, `STARTER` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.description` | string | read-only | Description of the organization |
| `currentState.label` | string | read-only | Short name of the organization |
| `currentState.name` | string | read-only | Name of the organization |
| `currentState.storageConsumed` | number | read-only | Size of consumed storage by all accounts |
| `currentState.updatedAt` | string (date-time) | read-only | Last update date |
| `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` |
| `targetSpec` | zimbra.OrganizationPutTargetSpec | read-only | Object representing organization |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string |  | Short name of the organization |
| `targetSpec.name` | string |  | Name of the organization |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "accountsStatistics": [
        {
          "availableAccountsCount": 0,
          "configuredAccountsCount": 0,
          "offer": "PRO"
        }
      ],
      "createdAt": "2024-01-01T12:00:00Z",
      "description": "string",
      "label": "string",
      "name": "string",
      "storageConsumed": 0,
      "updatedAt": "2024-01-01T12:00:00Z"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "description": "string",
      "label": "string",
      "name": "string"
    }
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/organization" \
  -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}/organization")

# 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}/organization");

print_r($result);
?>
```

## Get an organization

`GET /v2/zimbra/platform/{platformId}/organization/{organizationId}`

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

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

Returns the name, label and description of the organization, its storage consumed and its account statistics per offer.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.OrganizationCurrentState | read-only | Object representing organization |
| `currentState.accountsStatistics` | zimbra.OfferStatistics[] | read-only | Statistics of accounts on the organization |
| `currentState.accountsStatistics[].availableAccountsCount` | integer | read-only | Total number of accounts on this offer that can be configured |
| `currentState.accountsStatistics[].configuredAccountsCount` | integer | read-only | Number of accounts on the offer that are configured |
| `currentState.accountsStatistics[].offer` | zimbra.OfferEnum | read-only | Commercial name of the offer — one of `PRO`, `STARTER` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.description` | string | read-only | Description of the organization |
| `currentState.label` | string | read-only | Short name of the organization |
| `currentState.name` | string | read-only | Name of the organization |
| `currentState.storageConsumed` | number | read-only | Size of consumed storage by all accounts |
| `currentState.updatedAt` | string (date-time) | read-only | Last update date |
| `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` |
| `targetSpec` | zimbra.OrganizationPutTargetSpec | read-only | Object representing organization |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string |  | Short name of the organization |
| `targetSpec.name` | string |  | Name of the organization |

```json
{
  "checksum": "string",
  "currentState": {
    "accountsStatistics": [
      {
        "availableAccountsCount": 0,
        "configuredAccountsCount": 0,
        "offer": "PRO"
      }
    ],
    "createdAt": "2024-01-01T12:00:00Z",
    "description": "string",
    "label": "string",
    "name": "string",
    "storageConsumed": 0,
    "updatedAt": "2024-01-01T12:00:00Z"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "label": "string",
    "name": "string"
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/organization/{organizationId}" \
  -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}/organization/{organizationId}")

# 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}/organization/{organizationId}");

print_r($result);
?>
```

## Create an organization

`POST /v2/zimbra/platform/{platformId}/organization`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/organizations/#post-zimbra-platform-platformid-organization

**Status:** Stable production version  
**IAM actions:** `zimbra:apiovh:platform/organization/create`

Creates an organization from its `name`, its `label` and an optional `description`. The label is a short name that must be unique on the platform. Creation is asynchronous: follow `resourceStatus` and `currentTasks`.

### Parameters

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

### Request body (required)

Type: `zimbra.OrganizationPostPayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | zimbra.OrganizationPostTargetSpec | yes | Target organization specification |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string | yes | Short name of the organization |
| `targetSpec.name` | string | yes | Name of the organization |

```json
{
  "targetSpec": {
    "description": "string",
    "label": "string",
    "name": "string"
  }
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.OrganizationCurrentState | read-only | Object representing organization |
| `currentState.accountsStatistics` | zimbra.OfferStatistics[] | read-only | Statistics of accounts on the organization |
| `currentState.accountsStatistics[].availableAccountsCount` | integer | read-only | Total number of accounts on this offer that can be configured |
| `currentState.accountsStatistics[].configuredAccountsCount` | integer | read-only | Number of accounts on the offer that are configured |
| `currentState.accountsStatistics[].offer` | zimbra.OfferEnum | read-only | Commercial name of the offer — one of `PRO`, `STARTER` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.description` | string | read-only | Description of the organization |
| `currentState.label` | string | read-only | Short name of the organization |
| `currentState.name` | string | read-only | Name of the organization |
| `currentState.storageConsumed` | number | read-only | Size of consumed storage by all accounts |
| `currentState.updatedAt` | string (date-time) | read-only | Last update date |
| `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` |
| `targetSpec` | zimbra.OrganizationPutTargetSpec | read-only | Object representing organization |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string |  | Short name of the organization |
| `targetSpec.name` | string |  | Name of the organization |

```json
{
  "checksum": "string",
  "currentState": {
    "accountsStatistics": [
      {
        "availableAccountsCount": 0,
        "configuredAccountsCount": 0,
        "offer": "PRO"
      }
    ],
    "createdAt": "2024-01-01T12:00:00Z",
    "description": "string",
    "label": "string",
    "name": "string",
    "storageConsumed": 0,
    "updatedAt": "2024-01-01T12:00:00Z"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "label": "string",
    "name": "string"
  }
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/organization" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```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
)

# Request body type: zimbra.OrganizationPostPayload
result = client.post("/v2/zimbra/platform/{platformId}/organization",
	targetSpec = None, # Target organization specification (type: zimbra.OrganizationPostTargetSpec)
)

# 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

// Request body type: zimbra.OrganizationPostPayload
$result = $ovh->post("/v2/zimbra/platform/{platformId}/organization", array(
	targetSpec => null, // Target organization specification (type: zimbra.OrganizationPostTargetSpec)
));

print_r($result);
?>
```

## Delete an organization

`DELETE /v2/zimbra/platform/{platformId}/organization/{organizationId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/organizations/#delete-zimbra-platform-platformid-organization-organizationid

**Status:** Stable production version  
**IAM actions:** `zimbra:apiovh:platform/organization/delete`

Deletes the organization. An organization still linked to domains cannot be deleted.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/organization/{organizationId}" \
  -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.delete("/v2/zimbra/platform/{platformId}/organization/{organizationId}")

# 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->delete("/v2/zimbra/platform/{platformId}/organization/{organizationId}");

print_r($result);
?>
```

## Update an organization

`PUT /v2/zimbra/platform/{platformId}/organization/{organizationId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/email-and-collaborative-solutions/zimbra/organizations/#put-zimbra-platform-platformid-organization-organizationid

**Status:** Stable production version  
**IAM actions:** `zimbra:apiovh:platform/organization/edit`

Updates the name, label or description of the organization. When set, `checksum` must match the current checksum of the organization, otherwise the update is rejected.

### Parameters

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

### Request body (required)

Type: `zimbra.OrganizationPutPayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Known checksum of the resource, allowing to prevent unwanted side effects |
| `targetSpec` | zimbra.OrganizationPutTargetSpec | yes | Target organization specification |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string |  | Short name of the organization |
| `targetSpec.name` | string |  | Name of the organization |

```json
{
  "checksum": "string",
  "targetSpec": {
    "description": "string",
    "label": "string",
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | zimbra.OrganizationResponse | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |
| 412 | object | Error 412 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum hash in MD5 representation |
| `currentState` | zimbra.OrganizationCurrentState | read-only | Object representing organization |
| `currentState.accountsStatistics` | zimbra.OfferStatistics[] | read-only | Statistics of accounts on the organization |
| `currentState.accountsStatistics[].availableAccountsCount` | integer | read-only | Total number of accounts on this offer that can be configured |
| `currentState.accountsStatistics[].configuredAccountsCount` | integer | read-only | Number of accounts on the offer that are configured |
| `currentState.accountsStatistics[].offer` | zimbra.OfferEnum | read-only | Commercial name of the offer — one of `PRO`, `STARTER` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation |
| `currentState.description` | string | read-only | Description of the organization |
| `currentState.label` | string | read-only | Short name of the organization |
| `currentState.name` | string | read-only | Name of the organization |
| `currentState.storageConsumed` | number | read-only | Size of consumed storage by all accounts |
| `currentState.updatedAt` | string (date-time) | read-only | Last update date |
| `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` |
| `targetSpec` | zimbra.OrganizationPutTargetSpec | read-only | Object representing organization |
| `targetSpec.description` | string |  | Description of the organization |
| `targetSpec.label` | string |  | Short name of the organization |
| `targetSpec.name` | string |  | Name of the organization |

```json
{
  "checksum": "string",
  "currentState": {
    "accountsStatistics": [
      {
        "availableAccountsCount": 0,
        "configuredAccountsCount": 0,
        "offer": "PRO"
      }
    ],
    "createdAt": "2024-01-01T12:00:00Z",
    "description": "string",
    "label": "string",
    "name": "string",
    "storageConsumed": 0,
    "updatedAt": "2024-01-01T12:00:00Z"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "label": "string",
    "name": "string"
  }
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/zimbra/platform/{platformId}/organization/{organizationId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```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
)

# Request body type: zimbra.OrganizationPutPayload
result = client.put("/v2/zimbra/platform/{platformId}/organization/{organizationId}",
	checksum = None, # Known checksum of the resource, allowing to prevent unwanted side effects (type: string)
	targetSpec = None, # Target organization specification (type: zimbra.OrganizationPutTargetSpec)
)

# 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

// Request body type: zimbra.OrganizationPutPayload
$result = $ovh->put("/v2/zimbra/platform/{platformId}/organization/{organizationId}", array(
	checksum => null, // Known checksum of the resource, allowing to prevent unwanted side effects (type: string)
	targetSpec => null, // Target organization specification (type: zimbra.OrganizationPutTargetSpec)
));

print_r($result);
?>
```
