# Accept an invitation to join a company

A company admin invites you from Users → + User. If you already have a PiGi account you get an "accept invitation" link that signs you in and joins you to the company. If you don't, you get a registration link that creates your account and joins you in one step. Company invitations expire after 7 days; agent invitations after 14.

Source: https://help.pigi.io/guides/company-setup/getting-started/accept-an-invitation

## Quick answers

**How do I invite someone to my company?**
Open **People → Users** at /school/admin/users, click the **+ User** button, and search by
email in the **Search and Invite User** dialog. If they already have a PiGi account, click
**Invite** next to their result. If no account is found, the dialog offers
**Invite <their email>** instead.

**How long does an invitation last?**
7 days from when it is sent, for a company invitation. Agent invitations last 14 days. Each
invitation email states the number that applies to the link it carries. After that the link
reports that the invitation has expired.

**Can I set someone's roles when I invite them?**
Yes. The invite dialog shows **Assign Roles (optional)** with a checkbox per role, and a
**This user is a pilot** toggle for schools. Both are applied when the invitation is
accepted — whether the invitee is a brand-new user registering for the first time or an
existing account clicking the accept link.

**I already have a PiGi account — what happens when I click my invitation link?**
The link opens **/invitations/accept**. If you are not signed in it sends you to the login
page and brings you back afterwards. It then shows **Welcome!** and "You are now a member of
<company>", and redirects you to your workspace. If this was the first company you have ever
joined, PiGi also makes it your active workspace.

**I clicked my invitation link and it says "Invitation Failed". What now?**
Read the message underneath — it names which of four things went wrong: the invitation was
already accepted, an admin cancelled it, it has expired, or you are signed in as a different
account from the one it was sent to. For the last case, sign out and sign in as the invited
address. For the others, ask the admin to press **Resend** on your row, which mints a fresh
link.

**I'm new to PiGi — what does my invitation link do?**
It opens the registration form with the company's name and logo at the top and your email
already filled in and locked. Enter your name and a password, click **Create Account** (or
**Join as Pilot** / **Join as Instructor**), then verify your email. You are a member of the
company as soon as the account is created.

**Is /join/<code> an invitation link?**
No. Those are course-registration short links, resolved by the site itself. If one shows a
"link no longer valid" message the code has expired or been used.

## What this is

An invitation links an existing or new person to your company, optionally with roles and a
pilot record, without them having to register a company of their own. Two different emails
exist: an "accept invitation" email for people who already have a PiGi login, and a
"register and join" email for people who do not. Both end in the same place — membership of
the inviting company, with whatever roles the admin ticked.

## Before you start

- You must be an admin of the company to send invitations.
- You need the invitee's email address. That address is fixed — both the registration path
  and the accept page refuse an invitation whose email does not match.

## Steps — sending an invitation

1. Open **People → Users** (/school/admin/users).
2. Click **+ User**.
3. Type the person's email in **Search by email...** and click **Search by email**.
4. If a matching account appears, click **Invite** beside it. Their status shows
   **Already a member** or **Invitation pending** if they are already linked.
5. If no account is found, the dialog offers to invite the address. For a school, set
   **This user is a pilot** if they will fly. Tick any roles under **Assign Roles
   (optional)**.
6. Click **Invite <email>**. A toast confirms "Invitation sent to <email>".

## Steps — accepting an invitation when you already have an account

1. Click the button in the invitation email. It opens **/invitations/accept**.
2. If you are not signed in, PiGi sends you to the login page and returns you to the accept
   page afterwards. Sign in with the address the invitation was sent to.
3. The page shows **Processing Invitation**, then **Welcome!** and "You are now a member of
   <company>".
4. Click **Go to Homepage Now**, or wait for the countdown to redirect you.

## Steps — accepting an invitation as a new user

1. Click the button in the invitation email. It opens the registration form with the company
   banner showing and your email pre-filled and locked.
2. Enter your first name, last name and a password, then click **Create Account** (or
   **Join as Pilot** / **Join as Instructor** when the invitation says so).
3. Check your email for the verification link, then sign in.

## Known limitations

- **An invitation only works for the address it was sent to.** Signing in with a different
  account and opening the accept link fails with "This invitation was sent to <address>.
  Sign in with that account to accept it." An invitation cannot be transferred to another
  email — the admin has to invite the other address instead.
- **Invitations are never automatically marked expired.** Nothing runs on a timer; an
  invitation stays Pending on the admin's list until it is used, cancelled or superseded by
  a Resend. Expiry is enforced only at the moment someone tries to use the link.
- **Resending replaces the older link.** Once an admin presses **Resend**, the previous
  invitation email stops working — always use the newest one.
- Roles come from the invitation, not from anything the invitee chooses. Unknown role ids on
  the invitation are skipped silently.
- Agent invitations behave differently: accepting one links an agent record rather than
  creating a company membership, so the person does not appear in the company's user list.

## Related

- [Sign up your company](sign-up-your-company.md)
- [Roles and company types](roles-and-company-types.md)
- [Verify your email](verify-your-email.md)
