{
  "openapi": "3.1.0",
  "info": {
    "title": "TIDAL Hi-Fi API",
    "version": "5.17.0",
    "description": "",
    "license": {
      "name": "MIT",
      "url": "https://github.com/Mastermindzh/tidal-hifi/blob/master/LICENSE"
    },
    "contact": {
      "name": "Rick <mastermindzh> van Lieshout",
      "url": "https://www.rickvanlieshout.com"
    }
  },
  "externalDocs": {
    "description": "swagger.json",
    "url": "swagger.json"
  },
  "paths": {
    "/current": {
      "get": {
        "summary": "Get current media info",
        "tags": [
          "current"
        ],
        "responses": {
          "200": {
            "description": "Current media info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaInfo"
                }
              }
            }
          }
        }
      }
    },
    "/current/image": {
      "get": {
        "summary": "Get current media image",
        "tags": [
          "current"
        ],
        "responses": {
          "200": {
            "description": "Current media image",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/player/play": {
      "post": {
        "summary": "Play the current media",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/favorite/toggle": {
      "post": {
        "summary": "Add the current media to your favorites, or remove it if its already added to your favorites",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/pause": {
      "post": {
        "summary": "Pause the current media",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/next": {
      "post": {
        "summary": "Play the next song",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/previous": {
      "post": {
        "summary": "Play the previous song",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/shuffle/toggle": {
      "post": {
        "summary": "Play the previous song",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/repeat/toggle": {
      "post": {
        "summary": "Toggle the repeat status, toggles between \"off\" , \"single\" and \"all\"",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/player/playpause": {
      "post": {
        "summary": "Start playing the media if paused, or pause the media if playing",
        "tags": [
          "player"
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/settings/skipped-artists": {
      "get": {
        "summary": "get a list of artists that TIDAL Hi-Fi will skip if skipping is enabled",
        "tags": [
          "settings"
        ],
        "responses": {
          "200": {
            "description": "The list book.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringArray"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add new artists to the list of skipped artists",
        "tags": [
          "settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StringArray"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok"
          }
        }
      }
    },
    "/settings/skipped-artists/delete": {
      "post": {
        "summary": "Remove artists from the list of skipped artists",
        "tags": [
          "settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StringArray"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok"
          }
        }
      }
    },
    "/settings/skipped-artists/current": {
      "post": {
        "summary": "Add the current artist to the list of skipped artists",
        "tags": [
          "settings"
        ],
        "responses": {
          "200": {
            "description": "Ok"
          }
        }
      },
      "delete": {
        "summary": "Remove the current artist from the list of skipped artists",
        "tags": [
          "settings"
        ],
        "responses": {
          "200": {
            "description": "Ok"
          }
        }
      }
    },
    "/image": {
      "get": {
        "summary": "Get current image",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Current image",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/play": {
      "get": {
        "summary": "Play the current media",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Action performed",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/favorite/toggle": {
      "get": {
        "summary": "Add the current media to your favorites, or remove it if its already added to your favorites",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/pause": {
      "get": {
        "summary": "Pause the current media",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/next": {
      "get": {
        "summary": "Play the next song",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/previous": {
      "get": {
        "summary": "Play the previous song",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/playpause": {
      "get": {
        "summary": "Toggle play/pause",
        "tags": [
          "legacy"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "MediaInfo": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "artists": {
            "type": "string"
          },
          "album": {
            "type": "string"
          },
          "icon": {
            "type": "string",
            "format": "uri"
          },
          "playingFrom": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "current": {
            "type": "string"
          },
          "currentInSeconds": {
            "type": "integer"
          },
          "duration": {
            "type": "string"
          },
          "durationInSeconds": {
            "type": "integer"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "favorite": {
            "type": "boolean"
          },
          "player": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "shuffle": {
                "type": "boolean"
              },
              "repeat": {
                "type": "string"
              }
            }
          },
          "artist": {
            "type": "string"
          }
        },
        "example": {
          "title": "Sample Title",
          "artists": "Sample Artist",
          "album": "Sample Album",
          "icon": "/path/to/sample/icon.jpg",
          "playingFrom": "Sample Playlist",
          "status": "playing",
          "url": "https://tidal.com/browse/track/sample",
          "current": "1:23",
          "currentInSeconds": 83,
          "duration": "3:45",
          "durationInSeconds": 225,
          "image": "https://example.com/sample-image.jpg",
          "favorite": true,
          "player": {
            "status": "playing",
            "shuffle": true,
            "repeat": "one"
          },
          "artist": "Sample Artist"
        }
      },
      "OkResponse": {
        "type": "string",
        "example": "OK"
      },
      "StringArray": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": [
          "Artist1",
          "Artist2"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "current",
      "description": "The current media info API"
    },
    {
      "name": "player",
      "description": "The player control API"
    },
    {
      "name": "settings",
      "description": "The settings management API"
    }
  ]
}