> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/faq/help-topics/data-api-sdk/authentication-users-and-connection-state/deauthenticate-users.md).

# How do I deauthenticate users in bulk?

To disconnect a specific user, **call `/auth/deauthenticateUser` with the user's `user_id`** (this is API-only, not available in the dashboard). You will receive a deauth event confirming the disconnection, and no further data is collected.

There is **no bulk deauthentication endpoint**. To remove many users:

{% stepper %}
{% step %}
List all user IDs via `/subscriptions`.
{% endstep %}

{% step %}
Loop, calling `deauthenticateUser` for each.
{% endstep %}
{% endstepper %}

Deauth webhooks are sent asynchronously, so a few seconds' delay is expected; do not block your UI on it. Update your DB and connected-devices list as soon as the API call succeeds, and treat the webhook as a confirmation or backup signal (a newer API version processes these faster).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tryterra.co/faq/help-topics/data-api-sdk/authentication-users-and-connection-state/deauthenticate-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
