API Reference/api/auth/api/auth/invite

/api/auth/invite

Info
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 NameTypeDescription
expiresAtstring?The date the invite expires at
countnumber?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 disabled
  • invalid date - The date is invalid
  • date is in the past - The date is in the past

DELETE
Delete an invite

Query

Field NameTypeDescription
codestringThe 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: 3/23/2023
Edit this page on GitHub