> 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).
