# Teams

A team lets other people work in an advertiser's account. Every advertiser owns exactly one team, which is their own account, and can be a member of any number of other people's teams.

## Access

A member has one access level for each area, from `none`, `view`, `manage`:

- **Campaigns**: never below `view`. `manage` also means spending the team's balance.
- **Balance**: `manage` means topping it up.
- **Audiences**: conversions and audience features.
- **Members**: `view` lists the members; `manage` invites, edits and removes them.

Every member has a role. The owner's role is `owner`: every area at `manage`. The owner cannot be changed or removed and cannot leave. The standard roles have fixed levels:

- `admin`: campaigns `manage`, balance `manage`, audiences `manage`, members `manage`
- `manager`: campaigns `manage`, balance `view`, audiences `manage`, members `none`
- `analyst`: campaigns `view`, balance `view`, audiences `view`, members `none`

`custom` is any other combination. A custom combination equal to a standard role is refused; that role is used instead.

## Working in a team

In the Mini App a member works in a team's account within their levels: its campaigns, balance and audiences are the team's, and an action above the member's level is refused. What a member changes is recorded as theirs, as https://ad.api.imem.me/docs/campaigns.md | docs_campaigns describes for campaign history. A member with `manage` on balance tops up the team's balance as https://ad.api.imem.me/docs/topup.md | docs_topup describes. Profile, notification settings, referral earnings, promo codes and the API key stay personal. An AI agent works only in the account of the user who connected it.

## Invitations

A member with `manage` on members invites people with a link. Each link works once and expires. Accepting it gives exactly the role and access chosen when the link was made, even if the inviter's own access has changed since. Open links can be revoked. The number of members and open links per team is limited. A restriction on the user also refuses it: see https://ad.api.imem.me/docs/overview.md | docs_overview.

A link can be opened only when it can still be accepted. Opening or accepting one is refused when it has been used, revoked or has expired, when it is for the user's own team, when the user is already a member, or when the team is full.

## Changing access

- Nobody can grant, change or remove access above their own: in every area, the member's levels both before and after the change must be at or below the doer's.
- Nobody changes their own access; a member who wants out leaves the team.
- A team whose owner is blocked can be viewed but not changed, and nobody can join it. Its members can still leave.
