Skip to content

Close a member’s sessions at this company

POST
/v1/tenants/me/members/{userId}/revoke-sessions
curl --request POST \
--url https://api.emite.cr/v1/tenants/me/members/example/revoke-sessions \
--header 'Authorization: Bearer <token>'

The member loses this company from the sessions they have now — they stay signed in to their other companies, and only signing in again brings them back here (switch-tenant answers TENANT_REQUIRES_REAUTH). The WhatsApp number they linked from this company is unlinked, and they get a notice by email naming who did it. Audited as member.sessions_revoked.

userId
required
string

UUID of the member.

Media typeapplication/json
object
members
required

How many members lost this company from their current sessions: 1 for one member; for the whole team, every member but the caller (and but the owner, unless the caller is the owner) — 0 when there was nobody else.

number
whatsappUnlinked
required

How many WhatsApp numbers linked from this company were unlinked with them.

number
Example
{
"members": 1,
"whatsappUnlinked": 0
}

Missing or invalid JWT.

FEATURE_NOT_IN_PLAN — the plan does not include the session policy.

Insufficient scope. Team management is JWT-only — API keys cannot reach these endpoints.

Member not found (MEMBER_NOT_FOUND).

The owner (OWNER_SESSIONS_PROTECTED) or the caller (MEMBER_CANNOT_REVOKE_OWN_SESSIONS — use “sign out the other sessions” in the account instead).