Developer API

Access the MTG Companion API to build integrations and tools.

Authentication

All API requests require a Bearer token. Get one by logging in:

POST /api/v1/auth/login
Content-Type: application/json

{"username": "your_username", "password": "your_password"}

Response: {"token": "eyJ...", "user_id": "...", "is_admin": false}

Include the token in all requests: Authorization: Bearer YOUR_TOKEN

API Documentation

Enter your API token to access the full interactive documentation.

Quick Reference

GET /api/v1/cards/search?q=boltSearch cards
POST /api/v1/cards/scanScan a card image
GET /api/v1/collections/List collections
GET /api/v1/decks/List decks
GET /api/v1/prices/history/{id}Price history
GET /api/v1/dashboardUser dashboard