# Members and invites

> Roles, invite links and joining an organization.

## Roles

| Role | Can |
| --- | --- |
| Owner | Everything, including changing owners |
| Admin | Manage members, invites, API keys, privacy; publish surfaces |
| Member | View the namespace's traces, upload, manage their own private surfaces |

## Create an organization

Organizations are created through the API with a signed-in device session (the CLI after `traces login`), not with an API key:

```bash
curl -X POST https://adtraces.adfactory.app/v1/namespaces \
  -H "Authorization: Bearer <device token>" -H "Content-Type: application/json" \
  -d '{"slug":"my-team","displayName":"My Team"}'
```

## Invite people

Admins create invite links in the namespace settings. Choose the role, the number of uses (1 to 25 or unlimited) and the expiry (7 days or never); an e-mail address is only a hint. Send the link, which looks like `https://adtraces.adfactory.app/invite/<code>`. The invitee signs in or registers and joins with the chosen role. Links can be revoked.

From the CLI: `traces org invite <slug> code` and `traces org invite <slug> list`.

## Switch namespaces

```bash
traces namespace list
traces namespace use my-team
```

The active namespace decides where `traces share` uploads.
