milmilmilmil
API Reference

Integrations

Tracker OAuth flows and sync triggers (Bangumi, AniList, Trakt)

DELETE
/api/v1/integrations/anilist

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/integrations/anilist"
Empty
GET
/api/v1/integrations/anilist/auth-url

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/integrations/anilist/auth-url"
{  "url": "string"}
GET
/api/v1/integrations/anilist/callback

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

Query Parameters

code*string

Response Body

curl -X GET "https://example.com/api/v1/integrations/anilist/callback?code=string"
Empty
POST
/api/v1/integrations/anilist/sync

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/integrations/anilist/sync"
Empty
DELETE
/api/v1/integrations/bangumi

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/integrations/bangumi"
Empty
GET
/api/v1/integrations/bangumi/auth-url

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/integrations/bangumi/auth-url"
{  "url": "string"}
GET
/api/v1/integrations/bangumi/callback

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

Query Parameters

code*string

Response Body

curl -X GET "https://example.com/api/v1/integrations/bangumi/callback?code=string"
Empty
POST
/api/v1/integrations/bangumi/sync

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/integrations/bangumi/sync"
Empty
POST
/api/v1/integrations/tmdb/test

Always responds 200; ok reports whether the credentials worked.

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

application/json

curl -X POST "https://example.com/api/v1/integrations/tmdb/test" \  -H "Content-Type: application/json" \  -d '{}'
{  "ok": true,  "error": "string"}
DELETE
/api/v1/integrations/trakt

Deletes the persisted Trakt tokens and clears the per-user provider state in the sync service.

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/integrations/trakt"
Empty
POST
/api/v1/integrations/trakt/device-code

Requests a device code from Trakt, stashes it server-side under the user, and returns the user-facing code + verification URL the front-end displays. The client then polls /integrations/trakt/poll until the user authorises the device.

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/integrations/trakt/device-code"
{  "user_code": "string",  "verification_url": "http://example.com",  "expires_in": 0,  "poll_interval": 0}
POST
/api/v1/integrations/trakt/poll

Asks Trakt whether the user has authorised the device. Returns 202 {status:pending} while waiting, 200 {status:approved} once tokens are persisted (kicks off an initial import), 403 if denied, or 410 if the device code expired.

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

application/json

curl -X POST "https://example.com/api/v1/integrations/trakt/poll"
{  "status": "approved"}