# Organizations and members

Your organization, its members, invitations and roles.

An organization holds your miniVMs, templates, API keys, AI accounts and credit. Everything you create belongs to one organization, and no other organization can see it.

## Your first organization

When you sign up at [onshore.sh/app](https://onshore.sh/app/) (Google or an email magic link, or GitHub where the sign-in page offers it), onshore.sh creates an organization for you, with you as its owner.

- It gets its own template `base`, built for it. Your first miniVMs start from it. If that build fails because no card is saved yet, add a card, then open **Templates** in the console and click **Retry** on `base`.
- A miniVM needs a saved card. The first eligible card brings the welcome credit, once per person and once per card. See [Billing](https://onshore.sh/docs/account/billing#welcome-credit).

Your organization's ID is on **Settings** in the console. Click **Copy** next to it.

If you belong to two organizations or more, the console shows a switcher at the top: pick the organization to work in. `ons login` lets you pick one on the approval page in your browser. To ask for one directly:

```bash
ons login --org <organization-id>
```

`<organization-id>` is the ID of the organization you want the key for, as shown on **Settings**.

## Create another organization

You can create organizations of your own, up to 5, each with its own miniVMs, keys, members and
billing:

```bash
ons org create <name>
ons login --org <organization-id>
```

`<name>` is 1 to 63 lowercase letters, digits or `-`, starting with a letter or a digit, and not
already taken. `ons org create` prints the new organization's ID; `ons login --org` then gets you a
key for it. Your current login stays in its organization until you do.

A new organization has its own billing: before its first miniVM, add a card on its **Billing**
page, then credits. The welcome credit is given once per person and once per card, so a new
organization usually gets none.

## Add another sign-in method

If you sign in with a new method (for example Google after an email magic link) that confirms the same email as your account, the console asks you to sign in once with the method you used before. Then click **Confirm and link**. Both methods open the same account from then on, and we email you about every new sign-in method.

## Roles

There are two roles: **owner** and **member**.

| Action                                            | Member                  | Owner  |
| ------------------------------------------------- | ----------------------- | ------ |
| Create miniVMs and templates with their keys      | Yes                     | Yes    |
| Create API keys                                   | Yes                     | Yes    |
| Revoke API keys                                   | Their own               | Any    |
| See the organization's miniVMs in the console     | Yes                     | Yes    |
| Pause, resume and kill miniVMs in the console     | Of their own keys       | Any    |
| See the member list                               | Yes                     | Yes    |
| Invite people, see and revoke pending invitations | No                      | Yes    |
| Change roles                                      | No                      | Yes    |
| Remove a member                                   | Only themselves (leave) | Anyone |
| Add credit, change billing settings               | No (read only)          | Yes    |
| Receive billing notices by email                  | No                      | Yes    |

An organization always keeps at least one owner. The last owner cannot leave or be made a member: make another member an owner first.

## Invite people

Owners invite people from **Team** in the console.

1. Enter the person's email and pick a role (owner or member).
2. They get an email with a single-use link, valid **7 days**.
3. They open it and sign in **with that email address**.
4. They click **Accept and open the console**. They are then a member of your organization.

- Pending invitations are listed on **Team**. Revoke one there to send a new one to the same address.
- An organization has at most 50 pending invitations and sends at most 100 per day.
- A person who is already a member cannot be invited again: change their role instead.

## Change a role

On **Team**, an owner makes a member an owner, or an owner a member.

## Remove a member

On **Team**, an owner removes anyone, and a member can leave.

When someone leaves or is removed:

- Every API key they and their AI agents created in the organization is revoked.
- The invitations they sent are withdrawn.
- The miniVMs created with those keys are killed (end reason `member_removed`), since those keys held their access tokens.

Their user account is kept. Only their access to this organization ends.

## AI agents

An AI agent can sign in with its own agent identity: `ons login --agent`. The agent belongs to the person who owns it, and its key (valid 1 hour) goes to its owner's organization. The owner must have signed in to the console once. Its usage counts against its owner, welcome credit included.

## Delete an organization

To delete an organization and everything it holds, an owner writes to <support@onshore.sh>. Deletion:

- revokes every key and pending invitation, cancels waiting builds and deletes the templates;
- kills every running and paused miniVM, each with its [deletion receipt](https://onshore.sh/docs/guides/lifecycle#kill);
- deletes the organization's data.

What remains: billing records (10 years), security audit records without content (up to 90 days), salted welcome-credit hashes, abuse evidence (up to 90 days), and logs and backups until they expire. Your members' user accounts are kept.

## Related

- [API keys](https://onshore.sh/docs/account/api-keys)
- [Billing](https://onshore.sh/docs/account/billing)
- [Quotas and limits](https://onshore.sh/docs/account/quotas-and-limits)

Markdown version: https://onshore.sh/docs/account/organizations.md
