> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/users/delete-users.md). Agents can also search and read this documentation through its [MCP server](https://user.netmera.com/netmera-developer-guide/~gitbook/mcp).

# Delete Users

Marks users as untracked, so they are no longer targeted by campaigns. The user records are kept; to erase all of their data irreversibly, use `deleteUsersPermanently`.

<details>

<summary>Notes</summary>

* `deleteUsers` does not remove the user record. It marks the users as untracked, and `getProfileAttributes` still returns them.
* `deleteUsersPermanently` takes the same request body but also erases every piece of data stored about the users. It cannot be undone.
* If permanent deletion has not been activated for your application, `deleteUsersPermanently` behaves like `deleteUsers`.
* Untracked users are not removed later. They stay untracked and are excluded from targeting and counts.
* If the same `extId` is registered or updated again, the user is tracked again.
* A request without `extIds` returns HTTP 500, code `2001`.

</details>

```json
{"openapi":"3.1.0","info":{"title":"Netmera REST API","version":"3.0"},"tags":[{"name":"Users","description":"Create or update users in Netmera from your own system, and remove them. A user is identified by\nyour external ID (`extId`).\n\n<table data-view=\"cards\"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type=\"content-ref\"></th></tr></thead><tbody><tr><td><strong>Register Users</strong></td><td><code>POST</code> Registers users and their devices from your backend, or updates existing ones.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/users/register-users\">Register Users</a></td></tr><tr><td><strong>Delete Users</strong></td><td><code>POST</code> Marks users as untracked, so they are no longer targeted by campaigns.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/users/delete-users\">Delete Users</a></td></tr><tr><td><strong>Delete Users Permanently</strong></td><td><code>POST</code> Permanently deletes all data of the given users from Netmera, including their devices, profile attributes, events and records.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/users/delete-users-permanently\">Delete Users Permanently</a></td></tr></tbody></table>\n"}],"servers":[{"url":"https://restapi.netmera.com","description":"Netmera REST API"}],"security":[{"REST-API-key":[]}],"components":{"securitySchemes":{"REST-API-key":{"type":"apiKey","in":"header","name":"X-netmera-api-key","description":"REST API key. Available in the Netmera Panel under Developers > API.\n"}},"schemas":{"NetmeraError":{"type":"object","description":"Standard Netmera error body.","required":["code","error"],"properties":{"code":{"type":"integer","description":"Netmera error code. See the error table in the API description."},"error":{"type":"string","description":"Human readable error message."}}}},"responses":{"InvalidApiKey":{"description":"The `X-netmera-api-key` header is missing or the key is not valid.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"IpNotAllowed":{"description":"The application restricts REST calls to a list of allowed IP addresses and the caller's\nIP is not on it. The check runs after the API key is validated and before the request\nbody and parameters are validated, so a restricted application returns this error even\nfor a malformed request.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}}}},"paths":{"/rest/3.0/deleteUsers":{"post":{"operationId":"deleteUsers","tags":["Users"],"summary":"Delete Users","description":"Marks users as untracked, so they are no longer targeted by campaigns. The user records are\nkept; to erase all of their data irreversibly, use `deleteUsersPermanently`.\n\n<details>\n\n<summary>Notes</summary>\n\n- `deleteUsers` does not remove the user record. It marks the users as untracked, and\n  `getProfileAttributes` still returns them.\n- `deleteUsersPermanently` takes the same request body but also erases every piece of data stored\n  about the users. It cannot be undone.\n- If permanent deletion has not been activated for your application, `deleteUsersPermanently`\n  behaves like `deleteUsers`.\n- Untracked users are not removed later. They stay untracked and are excluded from targeting and\n  counts.\n- If the same `extId` is registered or updated again, the user is tracked again.\n- A request without `extIds` returns HTTP 500, code `2001`.\n\n</details>\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["extIds"],"properties":{"extIds":{"type":"array","description":"External user IDs to delete.","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"The deletion request was accepted."},"400":{"description":"Invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"$ref":"#/components/responses/IpNotAllowed"},"500":{"description":"Missing `extIds`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/users/delete-users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
