---
title: "Delete or trash an account"
method: DELETE
path: "/restapi/json/v1/resources/{resourceId}/accounts/{accountId}"
tags: ["Accounts"]
---

# Delete or trash an account

`DELETE /restapi/json/v1/resources/{resourceId}/accounts/{accountId}`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/resources/{resourceId}/accounts/{accountId}`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/resources/:resourceId/accounts/:accountId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Permanently deletes an account or moves it to the trash in PAM360. To move the account to trash instead of permanently deleting it, pass `deleteType` as `trash` in the INPUT_DATA. If INPUT_DATA is omitted or `deleteType` is not specified, the account is permanently deleted.

## Path parameters

- `resourceId` integer, required
- `accountId` integer, required

## Headers

- `orgName` string

## Request body `application/x-www-form-urlencoded`

- object
  - `INPUT_DATA` object: Optional JSON to control delete behavior.
    - `operation` object
      - `Details` object
        - `deleteType` 'trash' | 'delete': Set to `trash` to move the account to trash instead of permanently deleting it. If omitted or set to `delete`, the account is permanently deleted.

## Response `200`

Account deleted or moved to trash

- TrashAccountResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `name` string

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
