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

/api/auth/invite

Info
Info

Requires administrator privileges

GET
Get all invites

200
Ok (JSON Array)

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
expiresAtdate? | string?The date the invite expires at. For more info, refer to one of the upload options, image expiration
countnumber?The number of invites to create

200
Ok (JSON or JSON Array)

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 either invalid or set in the past.

DELETE
Delete an invite

Query

Field NameTypeDescription
codestringThe 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/2025
Edit this page on GitHub