Team
Remove somebody
Take a member off the account, or cancel an invitation — one endpoint, because they are one row.
curl --request DELETE \
--url 'https://truestat.io/api/v1/team/members/{userId}' \
--header 'Authorization: Bearer <token>'{
"data": {
"removed": true,
"user_id": "9c9df94f-59f2-4080-bc3c-21b80ebdfe9c",
"was_pending": false
},
"meta": {}
}Removes a member, or cancels an invitation that was never accepted.
One endpoint for both, because they are the same row at different stages.
was_pending in the response says which happened — you cannot ask afterwards,
since the row is gone.
What else goes
| Removing | Their TrueStat account |
| An unaccepted invitation | deleted with it |
| An accepted member | left alone |
The first account existed only for that invitation — nobody ever signed into it. Leaving it behind would one day produce the question why does this address look registered?
The second is theirs: their own password, possibly another organisation. Being removed from your team is not a reason to delete somebody's account.
Their data stays
Sites, goals, notes and everything else belong to the organisation, not to the person who created them. Nothing is deleted here except the seat.
The seat is freed immediately, so an invitation that was blocked by the plan's limit can be sent right after this call.
The owner cannot be removed
409 last_owner — nobody would be left to run the account, and the permission
needed to undo it would go with them.
Owner only, like every team write.
Authorizations
AuthorizationstringheaderrequiredAn API key from Settings → API keys. Scopes available: analytics:read, sites:read, sites:write, settings:read, settings:write, goals:read, goals:write, funnels:read, funnels:write, notes:read, notes:write, alerts:read, alerts:write, team:read, team:write, revenue:read, revenue:write.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path parameters
userIdstring (uuid)pathResponse
The answer.
dataobjectmetaobjecterrorobjecterrorobjecterrorobjecterrorobject