> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Close user's memberships

DELETE https://api-d.docusign.net/Management/v2/organizations/{organizationId}/users/{userId}/accounts
Content-Type: application/json

Closes a user's memberships.

[Required authentication scopes](/docs/admin-api/admin101/auth/): `user_write`.

This method requires user authentication. It will fail with an [application access token](/docs/admin-api/admin101/application-auth/).

Reference: https://developers.docusign.com/docs/admin-api/reference/usermanagement/esignusermanagement/closememberships

## Authentication

- `Authorization` header (bearer token, required) — OAuth2 Access code Grant

## Servers

- `https://api-d.docusign.net/Management` (Demo, default)
- `https://api.docusign.net/Management` (Production)

## Request

### Path parameters

- `organizationId` (string, required) — The organization ID Guid
- `userId` (string, required) — The user ID Guid

### Body (application/json)

This endpoint expects a DeleteMembershipsRequest.

- `accounts` (list of DeleteMembershipRequest, required) — A list of accounts to close for a user.

## Response

### 200

OK

- `success` (boolean, optional) — When **true,** the request to close the accounts succeeded.
- `accounts` (list of DeleteMembershipResponse, optional) — A list of accounts that were closed.

## Types

### DeleteMembershipRequest

- `id` (string, required) — The ID of a user's account you want to close.

### DeleteMembershipResponse

Results of closing accounts.

- `id` (string, optional) — The ID of an account that could not be closed.
- `error_details` (ErrorDetails, optional) — Errors.

### ErrorDetails

Errors.

- `error` (string, optional) — The code for the error.
- `error_description` (string, optional) — A description of the error.

## Examples

**Request**

```json
{
  "accounts": [
    {
      "id": "00000000-0000-0000-0000-000000000000"
    }
  ]
}
```

**Response**

```json
{
  "success": true,
  "accounts": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "error_details": {
        "error": "string",
        "error_description": "string"
      }
    }
  ]
}
```