{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/tracks": {
      "get": {
        "operationId": "TracksV1Controller_search",
        "summary": "Search and browse the track catalog",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}": {
      "get": {
        "operationId": "TracksV1Controller_getTrack",
        "summary": "Get full track metadata",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}/stream": {
      "get": {
        "operationId": "TracksV1Controller_getStreamUrl",
        "summary": "Get preview stream URL (30s watermarked)",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}/download": {
      "get": {
        "operationId": "TracksV1Controller_getDownloadUrl",
        "summary": "Get full track download URL (requires active license)",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "licenseId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}/attribution": {
      "get": {
        "operationId": "TracksV1Controller_getAttribution",
        "summary": "Get attribution text for licensed content",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}/license-terms": {
      "get": {
        "operationId": "TracksV1Controller_getLicenseTerms",
        "summary": "Get the current license terms for a track",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/tracks/{trackId}/waveform": {
      "get": {
        "operationId": "TracksV1Controller_getWaveform",
        "summary": "Get waveform peak data for visualization",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Tracks (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/licenses": {
      "post": {
        "operationId": "LicensesV1Controller_createLicense",
        "summary": "Issue a license for a track",
        "description": "Idempotent on (trackId, platformId, contentId). Returns existing active license if duplicate.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLicenseDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Licenses (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/licenses/{licenseId}": {
      "get": {
        "operationId": "LicensesV1Controller_getLicense",
        "summary": "Retrieve a license by ID",
        "parameters": [
          {
            "name": "licenseId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Licenses (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "operationId": "LicensesV1Controller_revokeLicense",
        "summary": "Revoke a license",
        "description": "Sets license status to revoked. The database record is NEVER deleted.",
        "parameters": [
          {
            "name": "licenseId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeLicenseDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Licenses (v1)"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/v1/auth/token": {
      "post": {
        "operationId": "AuthV1Controller_issueToken",
        "summary": "Exchange client credentials for access token",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Auth (v1)"
        ]
      }
    },
    "/api/v1/tracks/{trackId}/appeal": {
      "post": {
        "operationId": "ModerationV1Controller_submitAppeal",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitAppealDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/tracks/{trackId}/moderation-status": {
      "get": {
        "operationId": "ModerationV1Controller_getModerationStatus",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/usage-events": {
      "post": {
        "operationId": "UsageEventsV1Controller_record",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordUsageEventDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/catalog/sync": {
      "get": {
        "operationId": "CatalogSyncV1Controller_sync",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/tracks/{trackId}/stems": {
      "get": {
        "operationId": "TrackStemsV1Controller_listStems",
        "parameters": [
          {
            "name": "trackId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/platforms/register": {
      "post": {
        "operationId": "PlatformPortalV1Controller_register",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPlatformDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/platforms/checkout": {
      "post": {
        "operationId": "PlatformPortalV1Controller_startCheckout",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformCheckoutDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        }
      }
    },
    "/api/v1/platforms/{slug}/usage": {
      "get": {
        "operationId": "PlatformPortalV1Controller_monthlyUsage",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    }
  },
  "info": {
    "title": "Lesuto Disco API",
    "description": "Public Platform API (v1) — search, license, stream, and report usage. For integration partners only. Subject to Platform Partner terms.",
    "version": "1.0",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "InitiateUploadDto": {
        "type": "object",
        "properties": {}
      },
      "CreateLicenseDto": {
        "type": "object",
        "properties": {}
      },
      "RevokeLicenseDto": {
        "type": "object",
        "properties": {}
      },
      "TokenRequestDto": {
        "type": "object",
        "properties": {}
      },
      "StaffDecisionDto": {
        "type": "object",
        "properties": {}
      },
      "ReviewAppealDto": {
        "type": "object",
        "properties": {}
      },
      "SubmitAppealDto": {
        "type": "object",
        "properties": {}
      },
      "RegisterArtistDto": {
        "type": "object",
        "properties": {}
      },
      "ReportPlaybackDto": {
        "type": "object",
        "properties": {}
      },
      "CreateAlbumBodyDto": {
        "type": "object",
        "properties": {}
      },
      "UpdateProfileDto": {
        "type": "object",
        "properties": {}
      },
      "UpdateTrackBodyDto": {
        "type": "object",
        "properties": {}
      },
      "AssignAlbumTracksDto": {
        "type": "object",
        "properties": {}
      },
      "RevokeLicenseBodyDto": {
        "type": "object",
        "properties": {}
      },
      "ClosePeriodDto": {
        "type": "object",
        "properties": {}
      },
      "CheckoutBodyDto": {
        "type": "object",
        "properties": {}
      },
      "ImageUploadInitDto": {
        "type": "object",
        "properties": {}
      },
      "ImageUploadConfirmDto": {
        "type": "object",
        "properties": {}
      },
      "ArtistImageInitDto": {
        "type": "object",
        "properties": {}
      },
      "StemInitDto": {
        "type": "object",
        "properties": {}
      },
      "StemConfirmDto": {
        "type": "object",
        "properties": {}
      },
      "RecordUsageEventDto": {
        "type": "object",
        "properties": {}
      },
      "RegisterPlatformDto": {
        "type": "object",
        "properties": {}
      },
      "PlatformCheckoutDto": {
        "type": "object",
        "properties": {}
      }
    }
  }
}
