# Team & account

Source: https://www.pingtower.com/docs/service/team/

Invite teammates, manage members, mint and revoke API keys, and read the audit log of who did what.

Everything on this page is on the account plane and takes a `pts_` session token. In the app it lives under Account.

## Members and roles

<span class="pill get">GET</span> `/v1/tenants/{tid}/members` lists members with their role. Roles are `owner`, `admin` and `member`; see [Concepts](/docs/getting-started/concepts/#roles) for what each can do.

<span class="pill del">DELETE</span> `/v1/tenants/{tid}/members/{aid}` removes one and revokes their API keys. Removing the last owner is refused. Removing someone an on-call schedule, escalation ladder or override still names is refused with the list.

## Invites

<span class="pill post">POST</span> `/v1/tenants/{tid}/invites` with `{"email": "…", "role": "member"}` mints an invite token, valid seven days. Owner or admin only, and never above your own role. <span class="pill get">GET</span> lists pending ones; <span class="pill del">DELETE</span> `/v1/tenants/{tid}/invites/{id}` revokes one.

The invitee signs up or in, then <span class="pill post">POST</span> `/v1/invites/{token}/redeem`. In the app the tenant picker has a Join field for the token.

A self-hosted tenant refuses invites on pingtower.com, because its membership lives on the box. Use [pairing seats](/docs/self-hosting/relay/) instead.

## API keys

<span class="pill post">POST</span> `/v1/tenants/{tid}/keys` mints a `ptk_` key, shown once. <span class="pill get">GET</span> lists key ids and creation times, never secrets. <span class="pill del">DELETE</span> `/v1/tenants/{tid}/keys/{kid}` revokes. Keys have ids, not names, so note which id went where.

## Your account

- <span class="pill get">GET</span> `/v1/me` returns the account and every membership, which is where "I'm in three companies" becomes visible.
- <span class="pill post">POST</span> `/v1/account/email` and `/v1/account/password` change them; both re-prove the current password.
- <span class="pill post">POST</span> `/v1/logout` ends the session.
- <span class="pill post">POST</span> `/v1/account/delete` with your email and password deletes the account. Refused while you are the last owner of any tenant; hand it over or delete the tenant first. In the app: Account → Delete account.

### Forgotten password

The service sends no email. On the hosted service, write to [support@pingtower.com](mailto:support@pingtower.com) from the account's address. On your own box, `POST /v1/account/password/reset-request` writes a reset token to the daemon's log for you to relay, and `POST /v1/account/password/reset` redeems it.

## Tenant lifecycle

<span class="pill post">POST</span> `/v1/tenants/{tid}/rename` is owner or admin. <span class="pill post">POST</span> `/v1/tenants/{tid}/delete` is owner only and removes every project, alert and log line the tenant holds. <span class="pill get">GET</span> `/v1/tenants/{tid}/plan` reads [plan and usage](/docs/service/plans/).

## Audit log

<span class="pill get">GET</span> `/v1/tenants/{tid}/audit` returns entries of `actor`, `action`, `detail`, `created_at`, newest first. Every write on both planes is recorded: `tenant.create`, `tenant.rename`, `invite.create`, `invite.redeem`, `invite.revoke`, `member.remove`, `apikey.issue`, `apikey.revoke`, `project.*`, `source.*` including `source.rotate_token`, `rule.*`, `integration.*`, `action.*` including `action.fire`, `oncall.*`, `report.*`, `pair.issue`, `pair.redeem`, `relay.configure`, `plan.change`, `account.delete`, and every `alert.ack` and `alert.resolve`. The app shows it under Account → Audit log.
