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

# Delete Member

> Remove a member from your organization.

Delete (deactivate) a member from your organization. This removes the member's access and marks their account as inactive.

<Warning>
  **Permanent Action:** Deleted members lose access to the organization. Their historical data (jobs, tracks, etc.) is preserved but the account is deactivated. Consider carefully before deleting.
</Warning>

### REQUEST

```shell theme={null}
POST https://api.hellotracks.com/api/deleteaccount

{
   "data": {
      "uid": "<member-uid>"
   }
}
```

Alternatively, delete multiple members at once:

```shell theme={null}
POST https://api.hellotracks.com/api/deleteaccount

{
   "data": {
      "uids": ["<member-uid-1>", "<member-uid-2>", "<member-uid-3>"]
   }
}
```

<ParamField body="uid" type="string">
  UID of the member to delete. **Required** unless using `uids` for batch deletion.

  The member must not be a company account (cannot delete the company itself).
</ParamField>

<ParamField body="uids" type="array">
  Array of member UIDs to delete multiple members at once. **Alternative to `uid`** for batch operations.

  Example: `["abc123", "def456", "ghi789"]`
</ParamField>

### What Happens When You Delete a Member

1. **Account Deactivation:** The member's account is marked as inactive/deleted
2. **Access Removed:** The member loses access to the organization and mobile app
3. **Data Preserved:** Historical data (jobs, locations, reports) remains intact
4. **Reactivation Possible:** If you create a member with the same username later, the account can be reactivated

### Permissions

* **Administrators Only:** Only administrators and company owners can delete members
* **Edit Permission Required:** You must have edit permissions for the member
* **Cannot Delete Company:** You cannot delete the company account itself

### Batch Deletion

When using the `uids` array:

* All specified members are deleted in a single operation
* Members you don't have permission to delete are skipped (no error)
* Useful for bulk cleanup or offboarding multiple employees

### RESPONSE

```shell theme={null}
{
  "status": 0
}
```

<ResponseField name="status" type="integer" required>
  Status code. `0` indicates success.
</ResponseField>

### Examples

<RequestExample>
  ```bash Delete Single Member theme={null}
  curl -X POST https://api.hellotracks.com/api/deleteaccount \
    --header 'API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    -d '{
      "data": {
        "uid": "abc123"
      }
    }'
  ```

  ```bash Delete Multiple Members theme={null}
  curl -X POST https://api.hellotracks.com/api/deleteaccount \
    --header 'API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    -d '{
      "data": {
        "uids": ["worker1", "worker2", "worker3"]
      }
    }'
  ```
</RequestExample>

<Note>
  **Reactivation:** If you later create a member with the same username using [Create Member](/api-reference/endpoint/createaccount), the previously deleted account will be reactivated with its history intact.
</Note>

### Related Endpoints

* [Get Members](/api-reference/endpoint/getaccounts) - Retrieve member information
* [Create Member](/api-reference/endpoint/createaccount) - Add new members (can reactivate deleted ones)
* [Edit Member](/api-reference/endpoint/editaccount) - Update member properties
