/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? | The date the invite expires at. For more info, refer to the upload options |
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 either invalid or set in the past.
DELETE Delete an invite
Query
Field Name | Type | Description |
---|---|---|
code | string | The code of the invite |
200 Ok (JSON)
Returns the deleted 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: 3/3/2024
Edit this page on GitHub