LitMat (0.0.1)

Download OpenAPI specification:

The API for the LitMat app. Some things to keep in mind:

  • Auth is required on most paths, however obvious ones don't For example, login, registration, password reset, and verification paths do not require auth.
  • If on the web, use Cookies. If mobile, use Bearer auth.
  • If auth is expired, you will get a 419. If it is missing, you will get a 401.

For ease of documentation, many of the request bodies will have an id field that is generated by the API. You should not send this. However, in an effort to try to keep the YAML models simple, the same request/response model is generally used. Similarly, things like createdOn, lastLoginOn, and submittedOn are set by the API.

System Status

Status - API Status Check

Check the status of the API

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Status - API Status Check

Check the status of the API

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Status - API Status Check

Check the status of the API

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Support

Support - Request Create

Submit a request for support, such as from the landing page or in-app.

Request Body schema: application/json
required
id
integer

The autogenerated id returned in the response

userId
integer

Should be sent if known

email
string

Should be sent if known. Some cases may simply be anonymous reports.

subject
string

The subject of the request

body
string

The main message of the report

submittedOn
string <date-time>

When the request was submitted

browser
string

If using a browser, specify which one. It is fine to send "ios" or "android" if native; this is a freetext field.

category
string

The category of the request

status
string
Enum: "submitted" "closed"

Set by the server

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "userId": 0,
  • "email": "string",
  • "subject": "string",
  • "body": "string",
  • "submittedOn": "2019-08-24T14:15:22Z",
  • "browser": "string",
  • "category": "string",
  • "status": "submitted"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Captcha

Captcha - Check

Verify Captcha

Request Body schema: application/json
required
token
string

The captcha token

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Captcha - Get Site Key

Get Captcha Site Key. If this fails, assume that Captcha is not configured.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Authentication

Captcha - Check

Verify Captcha

Request Body schema: application/json
required
token
string

The captcha token

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Captcha - Get Site Key

Get Captcha Site Key. If this fails, assume that Captcha is not configured.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Register

Register a new account.

Request Body schema: application/json
required
firstName
string
lastName
string
email
string <email>
username
string
password
string <password>
dateOfBirth
string <date>

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "username": "string",
  • "password": "pa$$word",
  • "dateOfBirth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Register Verify

Verify a new account.

Request Body schema: application/json
required
token
string
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Login

Attempt to log in a user. If they have MFA, the response will be a 202 with the MFA required response.

Request Body schema: application/json
required
email
string <email>
username
string
password
string <password>
code
string

The MFA code if required

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "username": "string",
  • "password": "pa$$word",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Password Reset Start

Begin the process of resetting a user's password

Request Body schema: application/json
required
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Password Reset Verify

Verify a token to continue resetting a password

Request Body schema: application/json
required
email
string <email>
token
string
password
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "token": "string",
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Refresh

Attempt to refresh an access token. By default it will look for the cookie sent during login, but if mobile, you will likely need to use the request body.

Request Body schema: application/json
optional
refresh
string

The refresh token received during login

Responses

Request samples

Content type
application/json
{
  • "refresh": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Enroll

Begin MFA Enrollment

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Settings

View MFA settings; Note that is the user has not set up MFA, this may return an error instead

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Enroll Verification

Verify MFA Enrollment

Request Body schema: application/json
required
method
string
Value: "app"

The MFA method being verified; currently only supports app

code
string

The MFA code from the authenticator app, SMS, or email (depending on the MFA method)

Responses

Request samples

Content type
application/json
{
  • "method": "app",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User

User - Register

Register a new account.

Request Body schema: application/json
required
firstName
string
lastName
string
email
string <email>
username
string
password
string <password>
dateOfBirth
string <date>

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "username": "string",
  • "password": "pa$$word",
  • "dateOfBirth": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Register Verify

Verify a new account.

Request Body schema: application/json
required
token
string
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Login

Attempt to log in a user. If they have MFA, the response will be a 202 with the MFA required response.

Request Body schema: application/json
required
email
string <email>
username
string
password
string <password>
code
string

The MFA code if required

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "username": "string",
  • "password": "pa$$word",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Password Reset Start

Begin the process of resetting a user's password

Request Body schema: application/json
required
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Password Reset Verify

Verify a token to continue resetting a password

Request Body schema: application/json
required
email
string <email>
token
string
password
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "token": "string",
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - Refresh

Attempt to refresh an access token. By default it will look for the cookie sent during login, but if mobile, you will likely need to use the request body.

Request Body schema: application/json
optional
refresh
string

The refresh token received during login

Responses

Request samples

Content type
application/json
{
  • "refresh": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Enroll

Begin MFA Enrollment

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Settings

View MFA settings; Note that is the user has not set up MFA, this may return an error instead

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Enroll Verification

Verify MFA Enrollment

Request Body schema: application/json
required
method
string
Value: "app"

The MFA method being verified; currently only supports app

code
string

The MFA code from the authenticator app, SMS, or email (depending on the MFA method)

Responses

Request samples

Content type
application/json
{
  • "method": "app",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

MFA

User - MFA Enroll

Begin MFA Enrollment

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Settings

View MFA settings; Note that is the user has not set up MFA, this may return an error instead

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

User - MFA Enroll Verification

Verify MFA Enrollment

Request Body schema: application/json
required
method
string
Value: "app"

The MFA method being verified; currently only supports app

code
string

The MFA code from the authenticator app, SMS, or email (depending on the MFA method)

Responses

Request samples

Content type
application/json
{
  • "method": "app",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}