> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocoondata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <access-service>/api/v1/organisations/{orgGroupId}/plans/{planId}

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/organisations/{orgGroupId}/plans/{planId}
```

where `{orgGroupId}` is the ID of an organisation and `{planId}` is the ID of a plan.

## Supported methods and overview&#x20;

* `GET` - retrieves information about a [plan](/3.5/admin-org/managing-users-storage-quotas-through-plans.md) (specified by `planId`) configured in an organisation (specified by `orgGroupId`).
* `PUT` - modifies the fields of an existing plan (specified by `planId`) in an organisation (specified by `orgGroupId`).
* `DELETE` - deletes an existing plan (specified by `planId`) in an organisation (specified by `orgGroupId`).

> [!NOTE]
>
> The `GET` and `DELETE` methods take no parameters.

## Detailed description&#x20;

This API endpoint serves a number of purposes:

* Retrieves information about a plan (specified by `planId`) configured in an organisation (specified by `orgGroupId`). A plan's ID can be obtained by calling the `GET` method of the [\<access-service>/api/v1/organisations/\{orgGroupId}/plans](/3.5/api/access-service-api-v1-organisations-orggroupid-plans.md) API endpoint, which retrieves a list of field information for all current plans configured in an organisation (specified by `orgGroupId`).
* Modifies the fields of an existing plan (specified by `planId`) in an organisation (specified by `orgGroupId`). These fields include the plan's name, description, quota value (in MiB) and a flag that determines whether or not this plan will be the new default plan.
* Deletes an existing plan (specified by `planId`) in an organisation (specified by `orgGroupId`). \

  **Notes:**

  * A *MiB* is a [mebibyte](http://physics.nist.gov/cuu/Units/binary.html), where one MiB = 1 x 1024 x 1024 bytes = 1048576 bytes.
  * Any [Covata users](/3.5/api/authentication-and-authorisation.md) [in this organisation](/3.5/admin-org/administering-users-within-an-organisation.md) who were assigned this plan are automatically switched over to the **default** plan. Be aware that if this **default** plan has a quota which is lower than the amount of remote storage (managed by the Content Service) utilised by any of these users, then those users will no longer be able to upload any data until their storage utilization drops below the **default** plan's quota.
  * It is not possible delete the **default** plan.

## Supported roles and conditions&#x20;

This API endpoint supports requests utilising Covata user accounts with the following [roles](/3.5/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organisation Administrator's Guide](/3.5/admin-org.md)) and conditions:

* [Organisation administrator](/3.5/admin-org/administering-users-within-an-organisation.md#organisation-administrator-role) - when this user is a member of the organisation specified by `{orgGroupId}` in the request's URL.

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the [header](/3.5/api/access-service-api-v1-organisations-orggroupid-plans-planid.md#access-service-api-v1-organisations-orggroupid-plans-planid-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorisation: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

The following header is required if the body of the request has a JSON object:

* `Content-Type: application/json`

## Optional parameters&#x20;

The following optional parameters can be sent in the **body** of the PUT request, each as individual members of a **JSON object**:

* **name** - The updated name for the plan.
* **description** - The updated description for the plan.
* **quota** - The updated quota (in MiB) for the plan.
* **default** - An updated boolean value determining whether (`true`) or not (`false`) the plan being updated in the organisation (specified by `{orgGroupId}` in the URL) will be flagged as the new **default** plan for this organisation. \

  **Example (request):**

  ```json theme={null}
  {
    "default": true
  }
  ```

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.

For successful requests only, a JSON-formatted response containing the following members is also returned:

* **id** - The ID of the (updated) plan.
* **name** - The (updated) name of the plan.
* **description** - The (updated) description of the plan.
* **quota** - The (updated) quota of the plan (in MiB).
* **default** - An (updated) boolean value indicated whether (`true`) or not (`false`) this (updated) plan in the organisation (specified by `{orgGroupId}` in the URL) is flagged as the **default** plan for this organisation. \

  **Example (response):**

  ```json theme={null}
  {
      "id": "767973799974182912",
      "name": "Temporary Staff Originators",
      "description": "Temporary staff members with the Originator role.",
      "quota": 4096,
      "default": true
  }
  ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.