> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skillfactory.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Invitation System

> Create and manage invitation codes for course access

## Invitations

The invitation system allows you to create access codes that new users use to sign up and automatically enroll in specific courses.

## How it works

Each invitation generates a unique 7-character code (e.g., `AB2K7MZ`) that can be shared via link or entered manually. When someone accepts the invitation:

1. If they are a new user -> account created automatically with "student" role
2. If they already have an account -> enrolled in the invitation's course
3. The usage is recorded for tracking

## Creating an invitation

<Steps>
  <Step title="Go to Admin -> Invitations">
    Click "New invitation"
  </Step>

  <Step title="Fill in the fields">
    Set a title and select the associated course.
  </Step>

  <Step title="Configure limits (optional)">
    Set a usage limit and/or expiration date.
  </Step>

  <Step title="Generate the code">
    The system automatically generates a unique 7-character code.
  </Step>

  <Step title="Share">
    Copy the link or code and send it to prospective students.
  </Step>
</Steps>

## Invitation fields

| Field                | Required | Description                                                            |
| -------------------- | -------- | ---------------------------------------------------------------------- |
| **Title**            | Yes      | Identifying name for the invitation                                    |
| **Course**           | Yes      | Course the user will be enrolled in                                    |
| **Description**      | No       | Additional information about the invitation                            |
| **Background image** | No       | Image displayed on the acceptance page                                 |
| **Usage limit**      | No       | Maximum number of times the invitation can be used. Empty = unlimited. |
| **Expiration date**  | No       | Deadline to accept the invitation. Empty = no expiration.              |

## Invitation types

<Tabs>
  <Tab title="Single use">
    Set `limite_usos = 1` to create an exclusive invitation for one person.
  </Tab>

  <Tab title="Multiple use">
    Set a specific limit (e.g., 30 uses) for classes or events.
  </Tab>

  <Tab title="Unlimited">
    Leave the usage limit empty to create a permanent invitation with no quantity restriction.
  </Tab>

  <Tab title="With expiration">
    Set an expiration date for temporary invitations (e.g., event or promotion).
  </Tab>
</Tabs>

## Acceptance flow

When a user accesses the invitation link:

<Steps>
  <Step title="Invitation page">
    The user sees the invitation title, description, and image.
  </Step>

  <Step title="Fills in name and email">
    Required fields for identification.
  </Step>

  <Step title="Account created or linked">
    If the email already exists, the user is enrolled in the course. If not, a new account is created with the "student" role.
  </Step>

  <Step title="Email sent">
    New users receive a welcome email with the access password.
  </Step>
</Steps>

<Info>
  New users created via invitation receive the `require_change_password` flag, prompting a password change on first login.
</Info>

## Abuse protection

The invitation system has rate limits to prevent abuse:

* **Per IP**: maximum 5 attempts every 15 minutes
* **Per email**: maximum 3 attempts per hour

## Tracking

For each invitation, you can view:

* **Current uses** - How many times the invitation has been accepted
* **Acceptance list** - Who accepted, when, and with which email
* **Status** - Active, expired, or limit reached
* **Remaining spots** - If there is a limit, how many spots remain

## Managing invitations

| Action         | Description                                              |
| -------------- | -------------------------------------------------------- |
| **Edit**       | Change title, description, limits, and expiration        |
| **Deactivate** | Disable the invitation without deleting it (soft delete) |
| **Filter**     | By course or status (active/inactive)                    |

### Permissions

* **Owner and Admin**: can create and manage any invitation
* **Professor**: can create invitations only for courses they created or in which they are an associated professor

## Next steps

<CardGroup cols={2}>
  <Card title="Member management" icon="users" href="/en/admin/member-management">
    Manage existing users
  </Card>

  <Card title="Settings" icon="gear" href="/en/admin/platform-settings">
    Configure the default password for new members
  </Card>
</CardGroup>
