# Invite someone to your company

An invitation emails a link that lets someone join your company. There are two kinds — one for people who already have a PiGi account and one for people who don't — and both end with the person inside your company, with the roles you ticked. Pending invitations are listed on the Users screen, where you can resend or cancel them.

Source: https://help.pigi.io/guides/company-setup/people/invite-someone

## Quick answers

**How do I invite someone?**
Open **People → Users** at /school/admin/users, press **+ User**, search their email
address, then press **Invite** (existing account) or **Invite <their email>** (no account
yet). Only company admins can send invitations.

**How long does an invitation last?**
Seven days from the moment you send it. Agent invitations last fourteen days. The invitation
email states the right number for the link it carries. Nothing marks an invitation as
expired in the list — it is only rejected when the person tries to use it, with the message
"This invitation has expired".

**Where do I see pending invitations?**
At the top of **People → Users**, in a block headed **Pending Invitations (n)**. Each row
shows the email address, the expiry date, and a **Pilot** badge if the invitation creates a
pilot record.

**How do I resend an invitation?**
Press **Resend** on the person's Pending row in the Users list. PiGi cancels the old
invitation, mints a fresh token with a new seven-day expiry, and emails it. A toast confirms
"Invitation resent successfully". The older email stops working immediately, so tell them to
use the newest one.

**How do I cancel an invitation I sent by mistake?**
Press the trash button on the row in **Pending Invitations**. The invitation is marked
cancelled, its link stops working, and it disappears from the pending list. If the person
already had a Pending row on the Users list (because they had a PiGi account when you
invited them), use **Remove** on that row as well to take the membership away.

**How do I remove someone from my company?**
Press **Remove** on their row in the Users list and confirm. This deletes their membership
and all their roles in your company, and cancels any invitation still outstanding for them.
Their PiGi account itself is untouched — they keep any other companies they belong to. You
cannot remove yourself, and you cannot remove the company owner.

**Can I choose roles when I invite someone?**
Yes. Tick roles under **Assign Roles (optional)** in the invite dialog. They are applied
when the invitation is accepted, whether the person registers for the first time or accepts
with an existing account.

**Why does it say "This user is already registered. Please use the regular invite function."?**
You used the invite-by-email path for somebody who already has a PiGi account. Search their
email again and press **Invite** on the search result instead.

**Why does it say "An invitation has already been sent"?**
There is already a pending invitation for that email in your company. Resend it from the
Pending Invitations block, or cancel it first if you want to change the roles.

## What this is

An invitation is a one-time token tied to an email address and your company. PiGi mails a
link containing it, and when the recipient completes the flow their PiGi account is attached
to your company, with whatever roles you chose and — if you switched on **This user is a
pilot** — a pilot record.

Which of the two emails goes out depends purely on whether a PiGi account already exists for
that email address:

| Situation | Email subject | Where the link goes |
|---|---|---|
| Account already exists | Invitation to join <your company> | /invitations/accept |
| No account yet | You've been invited to join <your company> | /auth/register, which forwards to the join form |

## Before you start

- You need the Admin role in the company you are inviting into.
- Invitations only work from your own active company. An admin cannot invite into a company
  they are not currently acting as.

## Steps

1. Open **People → Users** and press **+ User**.
2. Type at least three characters of the email address and press **Search by email**.
3. **If a result appears** — press **Invite**. You will see "Invitation sent to <email>" and
   the person gets a Pending row on your Users list.
4. **If nothing appears** — PiGi shows the invite-by-email panel. Optionally switch on
   **This user is a pilot** and tick roles under **Assign Roles (optional)**, then press
   **Invite <their email>**.
5. Watch the **Pending Invitations** block for the expiry date, and use **Resend** or the
   trash button from there.

## What the recipient sees

- **New user**: they follow the link and land on the join form with your company's name and
  logo at the top and their email pre-filled and locked. They complete registration and are
  added to your company with the roles you ticked. The page headings adapt to what you
  invited them as — "Join as Pilot", "Join as Instructor", or "Create Account".
- **Existing user**: they follow the link to a page headed **Processing Invitation**. If
  they are not signed in they are sent to login and returned afterwards. It then shows
  **Welcome!** and "You are now a member of <your company>".

The invitation is rejected if the email does not match. On the registration path: "Email
does not match the invitation. Register using the invited email address." On the accept
page: "This invitation was sent to <address>. Sign in with that account to accept it."

## Known limitations

- **Resending invalidates the previous link.** The old invitation is marked cancelled the
  moment a new one is minted, so anyone working from an older email gets "This invitation
  has already been cancelled".
- **Cancelling an invitation does not remove a Pending membership.** When you invite an
  existing account, PiGi creates their membership straight away with status Pending.
  Cancelling the invitation only kills the link; press **Remove** on their Users row to take
  the membership away too.
- **Invitations are never automatically marked expired.** The status stays Pending in the
  list forever unless it is used, cancelled or superseded.
- **You cannot remove yourself or the company owner.** Both attempts fail with an
  explanatory message; transfer ownership first if you need to remove an owner.
- Agent invitations connect an agent record instead of creating a company membership, so an
  accepted agent invitation leaves no row on the Users list.

## Related

- [Add a user to your company](add-a-user.md)
- [Add an instructor](add-an-instructor.md)
- [Understand the company roles](roles-explained.md)
