{"openapi":"3.1.0","info":{"title":"UEFN Marketplace Developer API","version":"1.0.0","description":"Public REST API for UEFN Marketplace. Authenticate with a developer token (smcp_...) generated at https://uefnmarketplace.com/dashboard/developer, or with a Supabase JWT.","contact":{"url":"https://uefnmarketplace.com/api-docs"}},"servers":[{"url":"https://uefnmarketplace.com/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Developer token (smcp_...) or Supabase JWT"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"Asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","pending","published","rejected","archived"]},"visibility":{"type":"string","enum":["public","unlisted","private"]},"pricing_type":{"type":"string","enum":["fixed","free","pwyw"]},"price":{"type":"number","nullable":true},"is_free":{"type":"boolean"},"version":{"type":"string"},"download_count":{"type":"integer"},"view_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Profile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"display_name":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"is_seller":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/health":{"get":{"summary":"Health check","operationId":"getHealth","security":[],"responses":{"200":{"description":"Platform is healthy"},"503":{"description":"Platform degraded"}}}},"/me":{"get":{"summary":"Get my profile","operationId":"getMe","responses":{"200":{"description":"Profile data"},"401":{"description":"Unauthorized"}}},"patch":{"summary":"Update my profile","operationId":"patchMe","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"bio":{"type":"string"},"website":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated profile"},"401":{"description":"Unauthorized"},"403":{"description":"Scope missing: profile:write"}}}},"/assets":{"get":{"summary":"List my assets","operationId":"listAssets","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Asset list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"pagination":{"type":"object"}}}}}}}},"post":{"summary":"Create a draft asset","operationId":"createAsset","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","slug"],"properties":{"title":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","pattern":"^[a-z0-9-]+$"},"description":{"type":"string"},"pricing_type":{"type":"string","enum":["fixed","free","pwyw"]},"price":{"type":"number","minimum":0},"tags":{"type":"array","items":{"type":"string"},"maxItems":20},"visibility":{"type":"string","enum":["public","unlisted","private"]}}}}}},"responses":{"201":{"description":"Asset created"},"409":{"description":"Slug conflict"}}}},"/assets/batch":{"post":{"summary":"Batch create up to 25 draft assets","operationId":"batchCreateAssets","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"type":"object"},"maxItems":25}}}}}},"responses":{"207":{"description":"Partial or full success"},"422":{"description":"All items failed"}}}},"/assets/{id}":{"get":{"summary":"Get asset details","operationId":"getAsset","responses":{"200":{"description":"Asset details"},"404":{"description":"Not found"}}},"patch":{"summary":"Update asset","operationId":"updateAsset","responses":{"200":{"description":"Updated"}}},"delete":{"summary":"Delete draft asset","operationId":"deleteAsset","responses":{"200":{"description":"Deleted"},"409":{"description":"Not a draft"}}}},"/assets/{id}/upload-url":{"post":{"summary":"Get signed upload URL for asset file","operationId":"getAssetUploadUrl","responses":{"200":{"description":"Signed URL"}}}},"/assets/{id}/confirm-file":{"post":{"summary":"Record uploaded file path","operationId":"confirmAssetFile","responses":{"200":{"description":"Recorded"}}}},"/assets/{id}/images/upload-url":{"post":{"summary":"Get signed upload URL for image","operationId":"getImageUploadUrl","responses":{"200":{"description":"Signed URL"}}}},"/assets/{id}/confirm-image":{"post":{"summary":"Register uploaded image","operationId":"confirmImage","responses":{"201":{"description":"Image registered"}}}},"/assets/{id}/submit":{"post":{"summary":"Submit asset for review","operationId":"submitAsset","responses":{"200":{"description":"Submitted"},"422":{"description":"No file uploaded"}}}},"/tokens":{"get":{"summary":"List my API tokens","operationId":"listTokens","responses":{"200":{"description":"Token list"}}},"delete":{"summary":"Revoke a token","operationId":"revokeToken","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoked"}}}}}}