SynqDocs
Management APIMembers

End a member's sessions in the org

For a lost laptop or a token that may have leaked: from now, a Synq access token from a sign-in before now acts in this org no more, the dashboard's, the CLI's and an AI agent's (MCP host's) alike, and each answers 403 `fresh_sign_in_required` saying so. The member stays a member: once they sign in again, they work here as before, and an app or agent they connected before now needs connecting again. Their sessions in their other orgs are theirs and stay. The setup codes they made in the org stop working, and the change requests their agents asked for that wait on them are cancelled. Removing a member, or their leaving, ends all of this at once without this call: every request checks membership. API keys belong to the org, not to whoever made them, and keep working either way: revoke one they hold the secret of. Not the owner's, but by the owner. Needs `org.members.edit`, and nobody ends the sessions of someone who can do more than they can. Recorded as `member.sessions_ended`.

POST/v1/orgs/{org}/members/{user}/end-sessions

For a lost laptop or a token that may have leaked: from now, a Synq access token from a sign-in before now acts in this org no more, the dashboard's, the CLI's and an AI agent's (MCP host's) alike, and each answers 403 fresh_sign_in_required saying so. The member stays a member: once they sign in again, they work here as before, and an app or agent they connected before now needs connecting again. Their sessions in their other orgs are theirs and stay. The setup codes they made in the org stop working, and the change requests their agents asked for that wait on them are cancelled.

Removing a member, or their leaving, ends all of this at once without this call: every request checks membership. API keys belong to the org, not to whoever made them, and keep working either way: revoke one they hold the secret of.

Not the owner's, but by the owner. Needs org.members.edit, and nobody ends the sessions of someone who can do more than they can. Recorded as member.sessions_ended.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$
user*string

The member's user id at Synq

Match^usr_[0-9a-hjkmnp-tv-z]{26}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/members/usr_01h455vb4pex5vsknk084sn02q/end-sessions" \  -H "Authorization: Bearer $SYNQ_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
{  "sessions_ended_at": "2026-10-21T12:00:00.000Z",  "setup_codes_ended": 0,  "change_requests_cancelled": 0}