Authentication

All API requests require a valid API key sent via the Authorization header.

Bearer Token

Include your API key in the Authorization header using the Bearer scheme:

http
Authorization: Bearer mlk_v1_your_api_key

API Key Format

All API keys start with the prefix mlk_v1_. Keys that don't match this format will be rejected with a 401 error.

Example Request

bash
curl -X GET https://milarki.com/api/v1/tournaments \
  -H "Authorization: Bearer mlk_v1_your_api_key"

Error Responses

Authentication failures return a 401 Unauthorized response:

json
{
  "error": {
    "status": 401,
    "message": "Invalid API key",
    "code": "UNAUTHORIZED"
  }
}

Common authentication error messages:

  • Missing or invalid Authorization header — No header or wrong format
  • Invalid API key format — Key doesn't start with mlk_v1_
  • Invalid API key — Key unknown, deactivated, or the account it belongs to is no longer active

Those three causes deliberately share one message, so a 401 never tells you which one applies. If a key that used to work starts failing, check that it is still active on your account.