Skip to content
URD0TH edited this page Jul 11, 2026 · 7 revisions

API Documentation

Yamtrack provides a REST API for programmatic access to media tracking. The API uses JWT authentication and returns JSON responses.

Base URL

https://your-yamtrack-instance.com/api/

Authentication

Obtain Token

POST /api/token/

Request body:

{
  "email": "user@example.com",
  "password": "yourpassword"
}

Response:

{
  "access": "eyJhbGciOiJIUzI1NiIs...",
  "refresh": "eyJhbGciOiJIUzI1NiIs..."
}

Refresh Token

POST /api/token/refresh/

Request body:

{
  "refresh": "eyJhbGciOiJIUzI1NiIs..."
}

Get Current User

GET /api/auth/me/

Headers: Authorization: Bearer <access_token>

Media

List Media

GET /api/media/<media_type>/

media_type can be: movie, tv, anime, manga, game, book, comic, boardgame, season.

Create from External Source

POST /api/media/<media_type>/create/

Request body:

{
  "media_id": "12345",
  "source": "tmdb"
}

Manual Create

POST /api/media/manual/create/
{
  "media_type": "movie",
  "title": "My Movie",
  "status": "Completed",
  "progress": 1
}

Get Details

GET /api/details/<media_type>/<media_id>/

Get Season Details

GET /api/details/<media_type>/<media_id>/<season_number>/

Update Media

PUT /api/media/<media_type>/<id>/
{
  "score": 8,
  "status": "Completed"
}

Delete Media

DELETE /api/media/<media_type>/<id>/delete/

Sync Metadata

GET /api/media/<media_type>/<id>/sync/

Increase Progress

POST /api/media/<media_type>/<id>/progress/increase/

Decrease Progress

POST /api/media/<media_type>/<id>/progress/decrease/

Home

GET /api/home/

Returns in-progress and planning sections for the authenticated user.

Episodes

Create Watched Episode

POST /api/episodes/
{
  "media_id": "999",
  "source": "tmdb",
  "season_number": 1,
  "episode_number": 1
}

Search

GET /api/search/?q=<query>&type=<media_type>

type can be: movie, tv, anime, manga, etc.

History

GET /api/history/<media_type>/<id>/

Returns change history for a media item.

Statistics

GET /api/statistics/

Returns aggregated statistics for the authenticated user.

Supported Sources

Source Media Types
tmdb movie, tv
mal anime, manga
igdb game
openlibrary book
custom all

Status Values

  • Planning
  • In Progress
  • Completed
  • Dropped
  • Paused
  • Repeating

Clone this wiki locally