> ## 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/users/{userid}

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/users/{userid}
```

where `{userId}` is the ID of a Covata user.

## Supported methods and overview&#x20;

* `GET` - used to retrieve information about a [Covata user](/3.1/admin/administering-users.md), based on the user's ID.
* `PUT` - used to [modify](/3.1/admin/administering-users.md#editing-an-existing-user) the fields of a Covata user.
* `DELETE` - used to [delete](/3.1/admin/administering-users.md#deleting-users) a Covata user.

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

## Detailed description&#x20;

This API endpoint serves a number of purposes:

* Retrieves information about a Covata user, based on the Covata user's ID. A Covata user's ID can be obtained by calling the `GET` method of the [\<access-service>/api/v1/users](/3.1/api/access-service-api-v1-users.md) API endpoint, which retrieves a list of field information for all Covata Platform users who can be filtered through a variety of 'search' criteria. \

  **Tip:** All information returned in the [response](/3.1/api/access-service-api-v1-users-userid.md#access-service-api-v1-users-userid-returns) from a `GET` method call to this API endpoint is also returned in the [response](/3.1/api/access-service-api-v1-users.md#access-service-api-v1-users-returns-from-a-GET-request) from a `GET` method call to the [\<access-service>/api/v1/users](/3.1/api/access-service-api-v1-users.md) endpoint. Therefore, there is no need to call the `GET` method on this API endpoint (if you do not already have the Covata user's ID).
* Modifies the fields of an existing Covata user, based on the Covata user's ID. These fields include the user's:

  * first name, last name, other name and mobile number,
  * roles and current plan, and
  * flag which [forces the user to reset their password upon next their next sign-in attempt](/3.1/admin/administering-users.md#forcing-users-to-reset-their-passwords). It is also possible to force one or more Covata users to reset their passwords (upon their next sign-in attempt) in a single action by calling the [\<access-service>/api/v1/users/bulk](/3.1/api/access-service-api-v1-users-bulk.md) API endpoint.
* Deletes a Covata user (based on its ID), which removes this user from the Covata Platform, as well as:

  * changes the state of all Secure Objects which the user currently owns to *Deleted*,
  * deletes all collections which the user currently owns, and
  * deletes all reporting data associated with this user account.

  **Important:**

  * It is *strongly advised* that you first explicitly [delete the user's entire Secure Object content in storage](/3.1/api/content-service-api-v1-users-userid-contents.md) *before* calling the `DELETE` method of this API endpoint (which changes the state of all Secure Objects that the user currently owns to *Deleted*). If not, then the available storage space reported by the Covata Platform may remain significantly lower and will continue to do so, since the Covata Platform can no longer authenticate this user to obtain an access token required to manipulate these Secure Objects' data in storage through the Covata API.
  * It is also possible to delete one or more Covata users in a single action by calling the [\<access-service>/api/v1/users/bulk](/3.1/api/access-service-api-v1-users-bulk.md) endpoint.

## Supported roles&#x20;

This API endpoint supports the following Covata user [roles](/3.1/admin/administering-users.md#a-users-roles) (as described in the [Covata Platform Administrator's Guide](/3.1/admin.md)):

* [System administrator](/3.1/admin/administering-users.md#system-administrator-role)

The Covata Platform's resources available to one of these Covata users (above) is determined by the access token passed in the [header](/3.1/api/access-service-api-v1-users-userid.md#access-service-api-v1-users-userid-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6`

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:

* **firstName** - .
* **forceResetPassword** - true or false.
* **lastName** - .
* **mobileNumber** - .
* **otherName** - .
* **planId** - .
* **resetFailedLogins** - true or false.
* **roles** - ROLE\_SYSTEM\_ADMIN, ROLE\_COLLABORATOR, ROLE\_ORIGINATOR, ROLE\_ADHOC\_COLLABORATOR or ROLE\_USER\_ADMIN.

  **Example ():**

## Returns&#x20;

A JSON-formatted response containing the following members:

* **email** - .
* **firstName** - .
* **lastName** - .
* **otherName** - .
* **mobileNumber** - .
* **plan** - .

  * **id** - .
  * **name** - .
  * **description** - .
  * **quota** - .
  * **default** - .
* **enabled** - .
* **accountNonLocked** - .
* **numFailedLogins** - .
* **id** - .
* **accountType** - .
* **roles** - .
* **planId** - .

  **Example (response from ...):**


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