# Invite Endpoints {#invite-endpoints}


Manage user and employee invitations — send, accept, resend, and track invitations.


## Base Path {#base-path}


```
/api/invite
```


## Endpoints {#endpoints}



### List Invites {#list-invites}


```
GET /api/invite
Authorization: Bearer {token}
```


### Get Invite by ID {#get-invite-by-id}


```
GET /api/invite/:id
Authorization: Bearer {token}
```


### Get Invite by Token (Public) {#get-invite-by-token-public}


Validates an invitation token without authentication.

```
GET /api/invite/validate/:email/:token
```


### Send Invite {#send-invite}


```
POST /api/invite
Authorization: Bearer {token}
Content-Type: application/json

{
  "emailIds": ["user1@example.com", "user2@example.com"],
  "roleId": "role-uuid",
  "organizationId": "uuid",
  "invitedById": "user-uuid",
  "startedWorkOn": "2024-03-01",
  "appliedDate": "2024-03-01",
  "departmentIds": ["dept-uuid"],
  "teamIds": ["team-uuid"]
}
```


### Accept Invite {#accept-invite}


```
POST /api/invite/accept
Content-Type: application/json

{
  "email": "user@example.com",
  "token": "invite-token",
  "password": "SecureP@ssw0rd",
  "user": {
    "firstName": "John",
    "lastName": "Doe"
  }
}
```


### Resend Invite {#resend-invite}


```
POST /api/invite/resend
Authorization: Bearer {token}
Content-Type: application/json

{
  "inviteId": "invite-uuid"
}
```


### Delete Invite {#delete-invite}


```
DELETE /api/invite/:id
Authorization: Bearer {token}
```


## Invite Statuses {#invite-statuses}


| Status     | Description                        |
| ---------- | ---------------------------------- |
| `INVITED`  | Invitation sent, awaiting response |
| `ACCEPTED` | Invitation accepted by user        |
| `REJECTED` | Invitation rejected                |
| `EXPIRED`  | Invitation has expired             |


## Data Model {#data-model}


```typescript
interface IInvite {
  id: string;
  email: string;
  token: string;
  status: InviteStatusEnum;
  expireDate?: Date;
  actionDate?: Date;

  // Relations
  roleId: string;
  role?: IRole;
  invitedById?: string;
  organizationId: string;
  tenantId: string;
  departments?: IOrganizationDepartment[];
  teams?: IOrganizationTeam[];
  projects?: IOrganizationProject[];
}
```


## Related Pages {#related-pages}


- [Registration & Onboarding](https://sourcey-gauzy.pages.dev/authentication/registration-and-onboarding/index.md) — onboarding flow
- [User Endpoints](https://sourcey-gauzy.pages.dev/api/user-endpoints/index.md) — user management
- [Employee Endpoints](https://sourcey-gauzy.pages.dev/api/employee-endpoints/index.md) — employee management
