milmilmilmil
API Reference

Auth

Login, password change, 2FA setup and admin/setup bootstrap

DELETE
/api/v1/auth/2fa

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X DELETE "https://example.com/api/v1/auth/2fa"
Empty
POST
/api/v1/auth/2fa/setup

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X POST "https://example.com/api/v1/auth/2fa/setup"
{  "secret": "string",  "qr_code": "string",  "url": "string"}
GET
/api/v1/auth/2fa/status

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/auth/2fa/status"
{  "enabled": true}
POST
/api/v1/auth/2fa/verify

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/api/v1/auth/2fa/verify" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
Empty
POST
/api/v1/auth/login

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/auth/login" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "password": "string"  }'
{  "token": "string",  "user": {    "id": "string",    "username": "string"  }}
POST
/api/v1/auth/login/2fa

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/auth/login/2fa" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "token": "string",  "user": {    "id": "string",    "username": "string"  }}
POST
/api/v1/auth/logout

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X POST "https://example.com/api/v1/auth/logout"
Empty
GET
/api/v1/auth/me

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/auth/me"
{  "id": "string",  "username": "string",  "avatar_url": "string"}
PUT
/api/v1/auth/password

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PUT "https://example.com/api/v1/auth/password" \  -H "Content-Type: application/json" \  -d '{    "current_password": "string",    "new_password": "stringst"  }'
Empty
POST
/api/v1/auth/setup

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/api/v1/auth/setup" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "password": "stringst"  }'
Empty
GET
/api/v1/auth/status

Response Body

application/json

curl -X GET "https://example.com/api/v1/auth/status"
{  "initialized": true}
DELETE
/api/v1/auth/me/avatar

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X DELETE "https://example.com/api/v1/auth/me/avatar"
Empty
PUT
/api/v1/auth/me/avatar

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/auth/me/avatar" \  -H "Content-Type: application/json" \  -d '{}'
{  "avatar_url": "string"}
GET
/api/v1/users/{id}/avatar

Path Parameters

id*string

Query Parameters

size?integer
Default512

Value in

  • 128
  • 512
v?string

Cache buster, ignored

Response Body

image/jpeg

curl -X GET "https://example.com/api/v1/users/string/avatar"
"string"