📡 API Reference

Invite Endpoints

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

Base Path

/api/invite

Endpoints

List Invites

GET /api/invite
Authorization: Bearer {token}

Get Invite by ID

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

Get Invite by Token (Public)

Validates an invitation token without authentication.

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

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

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

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

{
  "inviteId": "invite-uuid"
}

Delete Invite

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

Invite Statuses

StatusDescription
INVITEDInvitation sent, awaiting response
ACCEPTEDInvitation accepted by user
REJECTEDInvitation rejected
EXPIREDInvitation has expired

Data Model

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[];
}

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey