/api/auth/invite
Info
Requires authentication
Info
Requires administrator privileges
GET Get all invites
200 Ok (JSON)
Returns an array of invites
[...,{"id": 35,"code": "ix8iFD","createdAt": "2022-11-11T03:34:25.532Z","expiresAt": null,"used": false,"createdById": 1},...]
400 Bad Request (JSON)
invites are disabled
- Invites are disabled
POST Create an invite
Body (JSON)
Field Name | Type | Description |
---|---|---|
expiresAt | `date? | string?` |
count | number? | The number of invites to create |
200 Ok (JSON)
Returns an array of invites or just a singular invite
[...,{"id": 35,"code": "ix8iFD","createdAt": "2022-11-11T03:34:25.532Z","expiresAt": null,"used": false,"createdById": 1},...]
{"id": 35,"code": "ix8iFD","createdAt": "2022-11-11T03:34:25.532Z","expiresAt": null,"used": false,"createdById": 1}
400 Bad Request (JSON)
invites are disabled
- Invites are disabledinvalid date
- The date is invaliddate is in the past
- The date is in the past
DELETE Delete an invite
Query
Field Name | Type | Description |
---|---|---|
code | string | The code of the invite |
200 Ok (JSON)
Returns an invite
{"id": 35,"code": "ix8iFD","createdAt": "2022-11-11T03:34:25.532Z","expiresAt": null,"used": false,"createdById": 1}
400 Bad Request (JSON)
no code
- No code was provided
404 Not Found (JSON)
invite not found
- The invite was not found
Last updated: 4/22/2023
Edit this page on GitHub