{"openapi":"3.0.0","info":{"title":"Skilldock API","version":"0.1.0"},"components":{"schemas":{},"parameters":{}},"paths":{"/health":{"get":{"responses":{"200":{"description":"Healthcheck","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}}},"/v1/stats":{"get":{"responses":{"200":{"description":"Registry totals across all packages: total tracked downloads, total skills, total releases, and total users.","content":{"application/json":{"schema":{"type":"object","properties":{"total_downloads":{"type":"integer","minimum":0},"total_skills":{"type":"integer","minimum":0},"total_releases":{"type":"integer","minimum":0},"total_users":{"type":"integer","minimum":0}},"required":["total_downloads","total_skills","total_releases","total_users"]}}}}}}},"/v1/tags":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"},{"schema":{"type":"string","enum":["skills_count_desc","downloads_desc"],"default":"skills_count_desc"},"required":false,"name":"sort","in":"query"}],"responses":{"200":{"description":"Paginated tags with visible-skill counts and aggregated download totals","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"tag_name":{"type":"string"},"image_tag_url":{"type":"string","nullable":true,"format":"uri"},"skills_count":{"type":"integer","minimum":0},"total_downloads":{"type":"integer","minimum":0}},"required":["id","tag_name","image_tag_url","skills_count","total_downloads"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/skills":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":false,"name":"namespace","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"tag","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated public search over skills","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_skills":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"verified":{"type":"boolean"},"title":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"latest_releases":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true}},"required":["version","status","created_at","published_at"]}},"reviews":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","verified","title","summary","tags","background_image_url","updated_at","author","latest_releases","reviews","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","total_skills","items","has_more"]}}}}}}},"/trends":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":false,"name":"namespace","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"tag","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated public trends over skills, ordered by downloads in the last 7 days","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_skills":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"verified":{"type":"boolean"},"title":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"latest_releases":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true}},"required":["version","status","created_at","published_at"]}},"downloads_last_week":{"type":"integer","minimum":0},"reviews":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","verified","title","summary","tags","background_image_url","updated_at","author","latest_releases","downloads_last_week","reviews","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","total_skills","items","has_more"]}}}}}}},"/v3/search":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"page":{"type":"integer","minimum":1,"maximum":10,"default":1},"per_page":{"type":"integer","minimum":1,"maximum":20,"default":10}},"required":["query"]}}}},"responses":{"200":{"description":"Searches Skilldock Vectorize v3 index (profile + markdown chunks) and returns a listing-compatible payload.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_found":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"verified":{"type":"boolean"},"title":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"latest_releases":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true}},"required":["version","status","created_at","published_at"]}},"reviews":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","verified","title","summary","tags","background_image_url","updated_at","author","latest_releases","reviews","sale"]}},"has_more":{"type":"boolean"},"applied_filters":{"type":"object","properties":{"sort":{"type":"string","nullable":true,"enum":["trending","new"]},"verification":{"type":"string","nullable":true},"price":{"type":"string","nullable":true,"enum":["free","paid"]},"tag":{"type":"string","nullable":true}},"required":["sort","verification","price","tag"]}},"required":["page","per_page","total_found","items","has_more"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Search provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v2/search":{"post":{"parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"tag","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":2000,"default":""},"page":{"type":"integer","minimum":1,"maximum":100,"default":1},"per_page":{"type":"integer","minimum":1,"maximum":40},"sort":{"type":"string","enum":["trending","new"]},"verification":{"type":"string","enum":["verified"]},"price":{"type":"string","enum":["free","paid"]},"rewrite_query":{"type":"boolean","default":true},"max_num_results":{"type":"integer","minimum":1,"maximum":40,"default":40},"ranking_options":{"type":"object","properties":{"score_threshold":{"type":"number","minimum":0,"maximum":1}}},"reranking":{"type":"object","properties":{"enabled":{"type":"boolean"},"model":{"type":"string","minLength":1,"maxLength":128}}}}}}}},"responses":{"200":{"description":"Searches AutoRAG index square-moon-e1fa and returns skill listing payload compatible with /v1/skills rendering.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_found":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"verified":{"type":"boolean"},"title":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"latest_releases":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true}},"required":["version","status","created_at","published_at"]}},"reviews":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","verified","title","summary","tags","background_image_url","updated_at","author","latest_releases","reviews","sale"]}},"has_more":{"type":"boolean"},"applied_filters":{"type":"object","properties":{"sort":{"type":"string","nullable":true,"enum":["trending","new"]},"verification":{"type":"string","nullable":true},"price":{"type":"string","nullable":true,"enum":["free","paid"]},"tag":{"type":"string","nullable":true}},"required":["sort","verification","price","tag"]}},"required":["page","per_page","total_found","items","has_more"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Search provider error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/skills/{namespace}/{slug}/reviews":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated reviews for a skill, including review image URLs.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"summary":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"datetime":{"type":"string"},"rate_value":{"type":"integer","minimum":0,"maximum":5},"rate_feedback":{"type":"string","nullable":true},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"url":{"type":"string"},"datetime":{"type":"string"}},"required":["id","url","datetime"]}}},"required":["id","datetime","rate_value","rate_feedback","author","images"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","summary","items","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rate_value":{"type":"integer","minimum":0,"maximum":5},"rate_feedback":{"type":"string","nullable":true,"maxLength":5000}},"required":["rate_value"]}}}},"responses":{"201":{"description":"Review created.","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"datetime":{"type":"string"},"skill_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"rate_value":{"type":"integer","minimum":0,"maximum":5},"rate_feedback":{"type":"string","nullable":true},"images_limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["id","datetime","skill_id","user_id","rate_value","rate_feedback","images_limit"]}},"required":["review"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/reviews/{id}/images":{"post":{"parameters":[{"schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Review images uploaded (multipart/form-data; repeat `images` field or use `image`).","content":{"application/json":{"schema":{"type":"object","properties":{"review_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"uploaded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"url":{"type":"string"},"datetime":{"type":"string"}},"required":["id","url","datetime"]}},"total_images":{"type":"integer","minimum":0},"images_limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["review_id","uploaded","total_images","images_limit"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Review not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Image too large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/reviews/{id}/flag":{"post":{"parameters":[{"schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Review marked as flagged/spam.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"review_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"flagged":{"type":"boolean","enum":[true]}},"required":["ok","review_id","flagged"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Review not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/review-images/{id}":{"get":{"parameters":[{"schema":{"type":"string","pattern":"^[1-9][0-9]*$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Streams a review image from R2.","content":{"image/*":{"schema":{"nullable":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/tags/{tag_id}":{"patch":{"parameters":[{"schema":{"type":"integer","minimum":1},"required":true,"name":"tag_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_tag_url":{"type":"string","nullable":true,"format":"uri"}},"required":["image_tag_url"]}}}},"responses":{"200":{"description":"Tag updated","content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":"object","properties":{"id":{"type":"integer"},"tag_name":{"type":"string"},"image_tag_url":{"type":"string","nullable":true,"format":"uri"}},"required":["id","tag_name","image_tag_url"]}},"required":["tag"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/google":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id_token":{"type":"string","minLength":10}},"required":["id_token"]}}}},"responses":{"200":{"description":"Verify Google ID token and upsert local user","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"},"display_name":{"type":"string","nullable":true}},"required":["id","email","display_name"]}},"required":["user"]}}}}}}},"/v1/me":{"get":{"responses":{"200":{"description":"Return current user (based on Google ID token)","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"},"display_name":{"type":"string","nullable":true}},"required":["id","email","display_name"]}},"required":["user"]}}}}}}},"/auth/cli/sessions":{"post":{"responses":{"200":{"description":"CLI auth session created","content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string","format":"uuid"},"auth_url":{"type":"string","format":"uri"},"expires_in":{"type":"integer"},"poll_interval_s":{"type":"integer"}},"required":["session_id","auth_url","expires_in","poll_interval_s"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/auth/cli/sessions/{session_id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"session_id","in":"path"}],"responses":{"200":{"description":"CLI auth session status","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["denied"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["expired"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["approved"]},"access_token":{"type":"string"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string"}},"required":["status","access_token","expires_in"]}]}}}},"429":{"description":"Polled too frequently / rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/auth/google/start":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"session_id","in":"query"}],"responses":{"302":{"description":"Redirect to Google OAuth"}}}},"/auth/google/callback":{"get":{"parameters":[{"schema":{"type":"string"},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_description","in":"query"}],"responses":{"200":{"description":"OAuth callback page","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/me/payout-methods":{"get":{"responses":{"200":{"description":"Current user's payout methods.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"kind":{"type":"string","enum":["ton_wallet","stripe"]},"ton_wallet_address":{"type":"string","nullable":true},"stripe_account_id":{"type":"string","nullable":true},"stripe_account_label":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","inactive"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","kind","ton_wallet_address","stripe_account_id","stripe_account_label","status","created_at","updated_at"]}}},"required":["items"]}}}}}}},"/v1/me/payout-methods/ton":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ton_wallet_address":{"type":"string","minLength":16,"maxLength":128}},"required":["ton_wallet_address"]}}}},"responses":{"200":{"description":"Saved active TON payout method.","content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"kind":{"type":"string","enum":["ton_wallet","stripe"]},"ton_wallet_address":{"type":"string","nullable":true},"stripe_account_id":{"type":"string","nullable":true},"stripe_account_label":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string","enum":["active"]}},"required":["id","kind","ton_wallet_address","stripe_account_id","stripe_account_label","created_at","updated_at","status"]}},"required":["method"]}}}}}}},"/v1/me/payout-methods/stripe":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stripe_account_id":{"type":"string","minLength":6,"maxLength":128},"stripe_account_label":{"type":"string","maxLength":200}},"required":["stripe_account_id"]}}}},"responses":{"200":{"description":"Saved active Stripe payout method.","content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"kind":{"type":"string","enum":["ton_wallet","stripe"]},"ton_wallet_address":{"type":"string","nullable":true},"stripe_account_id":{"type":"string","nullable":true},"stripe_account_label":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string","enum":["active"]}},"required":["id","kind","ton_wallet_address","stripe_account_id","stripe_account_label","created_at","updated_at","status"]}},"required":["method"]}}}}}}},"/v1/me/stripe/connect/start":{"post":{"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2}}}}}},"responses":{"200":{"description":"Create or resume Stripe Express onboarding for the current seller.","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"stripe_account_id":{"type":"string"},"account_status":{"type":"string","enum":["pending","restricted","enabled","disabled"]},"country":{"type":"string","nullable":true},"default_currency":{"type":"string","nullable":true},"details_submitted":{"type":"boolean"},"charges_enabled":{"type":"boolean"},"payouts_enabled":{"type":"boolean"},"onboarding_complete":{"type":"boolean"},"requirements_due":{"type":"array","items":{"type":"string"}},"requirements_errors":{"type":"array","items":{"type":"string"}},"requirements_disabled_reason":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"last_synced_at":{"type":"string","nullable":true}},"required":["stripe_account_id","account_status","country","default_currency","details_submitted","charges_enabled","payouts_enabled","onboarding_complete","requirements_due","requirements_errors","requirements_disabled_reason","created_at","updated_at","last_synced_at"]},"onboarding_url":{"type":"string","nullable":true,"format":"uri"}},"required":["account","onboarding_url"]}}}}}}},"/v1/me/stripe/connect/status":{"get":{"responses":{"200":{"description":"Current Stripe Express onboarding and readiness state for the seller.","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","nullable":true,"properties":{"stripe_account_id":{"type":"string"},"account_status":{"type":"string","enum":["pending","restricted","enabled","disabled"]},"country":{"type":"string","nullable":true},"default_currency":{"type":"string","nullable":true},"details_submitted":{"type":"boolean"},"charges_enabled":{"type":"boolean"},"payouts_enabled":{"type":"boolean"},"onboarding_complete":{"type":"boolean"},"requirements_due":{"type":"array","items":{"type":"string"}},"requirements_errors":{"type":"array","items":{"type":"string"}},"requirements_disabled_reason":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"last_synced_at":{"type":"string","nullable":true}},"required":["stripe_account_id","account_status","country","default_currency","details_submitted","charges_enabled","payouts_enabled","onboarding_complete","requirements_due","requirements_errors","requirements_disabled_reason","created_at","updated_at","last_synced_at"]}},"required":["account"]}}}}}}},"/v1/me/referral-link":{"get":{"responses":{"200":{"description":"Get or create current user's referral code and shareable link suffix/query.","content":{"application/json":{"schema":{"type":"object","properties":{"referral_code":{"type":"string"},"query_param":{"type":"string"},"requires_payout_method":{"type":"boolean"}},"required":["referral_code","query_param","requires_payout_method"]}}}}}}},"/v1/me/balance":{"get":{"responses":{"200":{"description":"Current seller/referrer balance snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"object","properties":{"pending_usd":{"type":"string"},"available_usd":{"type":"string"},"lifetime_earned_usd":{"type":"string"},"lifetime_paid_out_usd":{"type":"string"},"updated_at":{"type":"string"}},"required":["pending_usd","available_usd","lifetime_earned_usd","lifetime_paid_out_usd","updated_at"]}},"required":["balance"]}}}}}}},"/v1/me/balance/transactions":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Balance ledger history (incoming and outgoing).","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"direction":{"type":"string","enum":["in","out"]},"category":{"type":"string"},"status":{"type":"string"},"amount_usd":{"type":"string"},"sale_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"skill_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"invoice_id":{"type":"string","nullable":true,"format":"uuid"},"available_at":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","direction","category","status","amount_usd","sale_id","skill_id","invoice_id","available_at","note","created_at","updated_at"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/me/payout-requests":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_usd":{"anyOf":[{"type":"number","minimum":0,"exclusiveMinimum":true},{"type":"string","minLength":1}]},"payout_method_kind":{"type":"string","enum":["ton_wallet","stripe"]}}}}}},"responses":{"200":{"description":"Creates a payout request (manual/async processing).","content":{"application/json":{"schema":{"type":"object","properties":{"payout_request":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"status":{"type":"string","enum":["requested"]},"amount_usd":{"type":"string"},"payout_method_kind":{"type":"string","enum":["ton_wallet","stripe"]},"requested_at":{"type":"string"}},"required":["id","status","amount_usd","payout_method_kind","requested_at"]}},"required":["payout_request"]}}}}}},"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Payout request history and statuses.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"status":{"type":"string","enum":["requested","processing","paid","failed","cancelled"]},"amount_usd":{"type":"string"},"payout_method_kind":{"type":"string","enum":["ton_wallet","stripe"]},"provider_ref":{"type":"string","nullable":true},"failure_reason":{"type":"string","nullable":true},"requested_at":{"type":"string"},"processed_at":{"type":"string","nullable":true},"updated_at":{"type":"string"}},"required":["id","status","amount_usd","payout_method_kind","provider_ref","failure_reason","requested_at","processed_at","updated_at"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/skills/{namespace}/{slug}/commerce":{"patch":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"visibility":{"type":"string","enum":["public","private"]},"selling_description_md":{"type":"string","maxLength":50000}}}}}},"responses":{"200":{"description":"Updated skill commerce settings.","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}},"required":["namespace","slug","visibility"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"active_pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"active_price_usd":{"type":"string","nullable":true},"active_price_ton":{"type":"string","nullable":true},"active_price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"owner_setup":{"type":"object","properties":{"status":{"type":"string","enum":["not_selling","incomplete","selling"]},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["status","missing_requirements"]}},"required":["is_for_sale","selling_description_md","active_pricing_mode","active_price_usd","active_price_ton","active_price_ton_nano","sold_total"]}},"required":["skill","sale"]}}}}}}},"/v1/skills/{namespace}/{slug}/prices":{"post":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pricing_mode":{"type":"string","enum":["fixed_usd","fixed_ton"]},"price_usd":{"anyOf":[{"type":"number","minimum":0},{"type":"string","minLength":1}]},"price_ton":{"anyOf":[{"type":"number","minimum":0,"exclusiveMinimum":true},{"type":"string","minLength":1}]}}}}}},"responses":{"200":{"description":"Set active USD price for the skill (history preserved).","content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"pricing_mode":{"type":"string","enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"created_at":{"type":"string"}},"required":["id","pricing_mode","price_usd","price_ton","price_ton_nano","created_at"]}},"required":["price"]}}}}}}},"/v1/skills/{namespace}/{slug}/buy":{"post":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"payment_provider":{"type":"string","enum":["ton","stripe"]},"referral_code":{"type":"string","minLength":1,"maxLength":24}}}}}},"responses":{"200":{"description":"Creates or returns a pending invoice for buying this private skill (TON or Stripe).","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"payment_provider":{"type":"string","enum":["ton","stripe"]},"pricing_mode_snapshot":{"type":"string","enum":["fixed_usd","fixed_ton"]},"status":{"type":"string","enum":["pending","paid","expired","cancelled"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"paid_at":{"type":"string","nullable":true},"pay_to_address":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"amount_ton":{"type":"string","nullable":true},"amount_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"amount_usd":{"type":"string","nullable":true},"amount_usd_cents":{"type":"integer","nullable":true,"minimum":0},"ton_usd_rate":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true},"rate_source":{"type":"string","nullable":true},"tx_hash":{"type":"string","nullable":true},"stripe_checkout_session_id":{"type":"string","nullable":true},"stripe_checkout_url":{"type":"string","nullable":true,"format":"uri"},"stripe_payment_intent_id":{"type":"string","nullable":true},"stripe_payment_status":{"type":"string","nullable":true},"referral_code":{"type":"string","nullable":true},"access_granted":{"type":"boolean"},"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["namespace","slug","title"]}},"required":["id","payment_provider","pricing_mode_snapshot","status","created_at","expires_at","paid_at","pay_to_address","memo","amount_ton","amount_ton_nano","amount_usd","amount_usd_cents","ton_usd_rate","rate_source","tx_hash","stripe_checkout_session_id","stripe_checkout_url","stripe_payment_intent_id","stripe_payment_status","referral_code","access_granted","skill"]}},"required":["created","invoice"]}}}}}}},"/v1/skill-purchases/invoices/{invoice_id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invoice_id","in":"path"}],"responses":{"200":{"description":"Invoice details and access state.","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"payment_provider":{"type":"string","enum":["ton","stripe"]},"pricing_mode_snapshot":{"type":"string","enum":["fixed_usd","fixed_ton"]},"status":{"type":"string","enum":["pending","paid","expired","cancelled"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"paid_at":{"type":"string","nullable":true},"pay_to_address":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"amount_ton":{"type":"string","nullable":true},"amount_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"amount_usd":{"type":"string","nullable":true},"amount_usd_cents":{"type":"integer","nullable":true,"minimum":0},"ton_usd_rate":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true},"rate_source":{"type":"string","nullable":true},"tx_hash":{"type":"string","nullable":true},"stripe_checkout_session_id":{"type":"string","nullable":true},"stripe_checkout_url":{"type":"string","nullable":true,"format":"uri"},"stripe_payment_intent_id":{"type":"string","nullable":true},"stripe_payment_status":{"type":"string","nullable":true},"referral_code":{"type":"string","nullable":true},"access_granted":{"type":"boolean"},"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["namespace","slug","title"]}},"required":["id","payment_provider","pricing_mode_snapshot","status","created_at","expires_at","paid_at","pay_to_address","memo","amount_ton","amount_ton_nano","amount_usd","amount_usd_cents","ton_usd_rate","rate_source","tx_hash","stripe_checkout_session_id","stripe_checkout_url","stripe_payment_intent_id","stripe_payment_status","referral_code","access_granted","skill"]}},"required":["invoice"]}}}}}}},"/v1/me/sales":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful paid sales for current seller account.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"sale_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"payment_provider":{"type":"string","enum":["ton","stripe"]},"pricing_mode_snapshot":{"type":"string","enum":["fixed_usd","fixed_ton"]},"paid_at":{"type":"string"},"amount_usd":{"type":"string","nullable":true},"amount_ton":{"type":"string","nullable":true},"seller_net_usd":{"type":"string","nullable":true},"referral_commission_usd":{"type":"string","nullable":true},"tx_hash":{"type":"string","nullable":true},"buyer":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true}},"required":["user_id","display_name"]},"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["namespace","slug","title"]}},"required":["sale_id","payment_provider","pricing_mode_snapshot","paid_at","amount_usd","amount_ton","seller_net_usd","referral_commission_usd","tx_hash","buyer","skill"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/skills/{namespace}/{slug}/sales":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Successful sales for a concrete skill (author only).","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_sales":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"sale_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"payment_provider":{"type":"string","enum":["ton","stripe"]},"pricing_mode_snapshot":{"type":"string","enum":["fixed_usd","fixed_ton"]},"paid_at":{"type":"string"},"amount_usd":{"type":"string","nullable":true},"amount_ton":{"type":"string","nullable":true},"seller_net_usd":{"type":"string","nullable":true},"referral_commission_usd":{"type":"string","nullable":true},"tx_hash":{"type":"string","nullable":true},"buyer_user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"buyer_display_name":{"type":"string","nullable":true}},"required":["sale_id","payment_provider","pricing_mode_snapshot","paid_at","amount_usd","amount_ton","seller_net_usd","referral_commission_usd","tx_hash","buyer_user_id","buyer_display_name"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","total_sales","items","has_more"]}}}}}}},"/v1/tokens":{"post":{"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":50},"expires_in_days":{"type":"integer","minimum":1,"maximum":365}}}}}},"responses":{"200":{"description":"Token created","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_meta":{"type":"object","properties":{"id":{"type":"integer"},"token_prefix":{"type":"string"},"scopes":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string","nullable":true},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true}},"required":["id","token_prefix","scopes","created_at","expires_at","revoked_at","last_used_at"]}},"required":["token","token_meta"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated token list","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"token_prefix":{"type":"string"},"scopes":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string","nullable":true},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true}},"required":["id","token_prefix","scopes","created_at","expires_at","revoked_at","last_used_at"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tokens/{token_id}":{"delete":{"parameters":[{"schema":{"type":"integer","minimum":1},"required":true,"name":"token_id","in":"path"}],"responses":{"200":{"description":"Token revoked","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"integer"},"token_prefix":{"type":"string"},"scopes":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string","nullable":true},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true}},"required":["id","token_prefix","scopes","created_at","expires_at","revoked_at","last_used_at"]}},"required":["token"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/skills/validate":{"post":{"responses":{"200":{"description":"Validation results","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"}},"required":["code","message"]}},"properties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"license":{"type":"string"},"compatibility":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"allowed_tools":{"type":"string"}}},"root_prefix":{"type":"string"},"file_count":{"type":"integer"}},"required":["ok","problems","root_prefix","file_count"]}}}}}}},"/v1/skills/{namespace}/{slug}/releases/{version}/properties":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"Agent Skills properties (frontmatter-derived) for the given release","content":{"application/json":{"schema":{"type":"object","properties":{"properties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"license":{"type":"string"},"compatibility":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"allowed_tools":{"type":"string"}},"required":["name","description"]},"location":{"type":"string","format":"uri"}},"required":["properties","location"]}}}}}}},"/v1/skills/{namespace}/{slug}/releases/{version}/SKILL.md":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"SKILL.md (markdown)","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/v1/skills/to-prompt":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string","minLength":2,"maxLength":64},"slug":{"type":"string","minLength":2,"maxLength":64},"version":{"type":"string","minLength":1,"maxLength":64}},"required":["namespace","slug"]}}},"required":["skills"]}}}},"responses":{"200":{"description":"Prompt XML","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/namespaces/{slug}":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Namespace details","content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string","enum":["user","org"]},"created_at":{"type":"string"},"verified_at":{"type":"string","nullable":true}},"required":["slug","kind","created_at","verified_at"]}},"required":["namespace"]}}}}}},"patch":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"new_slug":{"type":"string","minLength":2,"maxLength":64}},"required":["new_slug"]}}}},"responses":{"200":{"description":"Namespace updated","content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]}},"required":["namespace"]}}}}}}},"/v1/me/namespaces":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Namespaces where the current user is a member","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string","enum":["user","org"]},"role":{"type":"string"},"created_at":{"type":"string"},"verified_at":{"type":"string","nullable":true}},"required":["slug","kind","role","created_at","verified_at"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/namespaces":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":2,"maxLength":64},"kind":{"type":"string","enum":["org"]}},"required":["slug","kind"]}}}},"responses":{"201":{"description":"Namespace created","content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string","enum":["org"]}},"required":["slug","kind"]}},"required":["namespace"]}}}}}}},"/v1/skills/{namespace}/{slug}":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Skill details (latest release included), with download stats: total, last_week, and last_month.","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"homepage_url":{"type":"string","nullable":true,"format":"uri"},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"description_md":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]},"first_release_created_at":{"type":"string","nullable":true},"reviews":{"type":"object","properties":{"average_rating":{"type":"number","nullable":true,"minimum":0,"maximum":5},"review_count":{"type":"integer","minimum":0}},"required":["average_rating","review_count"]},"access":{"type":"object","properties":{"can_view_full_content":{"type":"boolean"},"is_owner":{"type":"boolean"},"is_buyer":{"type":"boolean"},"can_buy":{"type":"boolean"}},"required":["can_view_full_content","is_owner","is_buyer","can_buy"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"owner_setup":{"type":"object","properties":{"status":{"type":"string","enum":["not_selling","incomplete","selling"]},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["status","missing_requirements"]}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total"]}},"required":["namespace","slug","title","summary","author","homepage_url","background_image_url","description_md","tags","created_at","updated_at","download_stats","first_release_created_at","reviews","access","sale"]},"latest_release":{"type":"object","nullable":true,"properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true},"description_md":{"type":"string"},"manifest":{"type":"object","additionalProperties":{"nullable":true}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"},"content_type":{"type":"string"},"download_url":{"type":"string"}},"required":["id","kind","sha256","size_bytes","content_type","download_url"]}},"dependencies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"namespace":{"type":"string"},"slug":{"type":"string"},"version_requirement":{"type":"string"},"release_version":{"type":"string","nullable":true}},"required":["id","namespace","slug","version_requirement","release_version"]}},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]}},"required":["version","status","created_at","published_at","description_md","manifest","files","dependencies","download_stats"]},"releases":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"},"content_type":{"type":"string"},"download_url":{"type":"string"}},"required":["id","kind","sha256","size_bytes","content_type","download_url"]}},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]}},"required":["version","status","created_at","published_at","files","download_stats"]}}},"required":["skill","latest_release","releases"]}}}}}},"patch":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Skill metadata updated","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"homepage_url":{"type":"string","nullable":true,"format":"uri"},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"}},"required":["namespace","slug","homepage_url","background_image_url","updated_at"]}},"required":["skill"]}}}}}},"delete":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Skill disabled","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}}},"/v1/skills/{namespace}/{slug}/releases":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated published releases for a skill.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"},"content_type":{"type":"string"},"download_url":{"type":"string"}},"required":["id","kind","sha256","size_bytes","content_type","download_url"]}},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]}},"required":["version","status","created_at","published_at","files","download_stats"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}},"post":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"version","in":"query"},{"schema":{"type":"string","enum":["public","private"]},"required":false,"name":"visibility","in":"query"},{"schema":{"type":"string","maxLength":2048,"format":"uri"},"required":false,"name":"homepage_url","in":"query"},{"schema":{"type":"string","maxLength":2048,"format":"uri"},"required":false,"name":"background_image_url","in":"query"}],"responses":{"201":{"description":"Release created","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"version":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","kind","sha256","size_bytes","download_url"]}},"dependencies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"namespace":{"type":"string"},"slug":{"type":"string"},"version_requirement":{"type":"string"},"release_version":{"type":"string","nullable":true}},"required":["id","namespace","slug","version_requirement","release_version"]}}},"required":["version","files","dependencies"]}},"required":["release"]}}}}}}},"/v1/skills/{namespace}/{slug}/releases/{version}":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"namespace","in":"path"},{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"Release details with release-level and skill-level download stats, plus first release creation date.","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]},"first_release_created_at":{"type":"string","nullable":true}},"required":["namespace","slug","download_stats","first_release_created_at"]},"release":{"type":"object","properties":{"version":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"published_at":{"type":"string","nullable":true},"description_md":{"type":"string"},"manifest":{"type":"object","additionalProperties":{"nullable":true}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"},"content_type":{"type":"string"},"download_url":{"type":"string"}},"required":["id","kind","sha256","size_bytes","content_type","download_url"]}},"dependencies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"namespace":{"type":"string"},"slug":{"type":"string"},"version_requirement":{"type":"string"},"release_version":{"type":"string","nullable":true}},"required":["id","namespace","slug","version_requirement","release_version"]}},"download_stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total tracked downloads."},"last_week":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 7 days."},"last_month":{"type":"integer","minimum":0,"description":"Tracked downloads in the last 30 days."}},"required":["total","last_week","last_month"]}},"required":["version","status","created_at","published_at","description_md","manifest","files","dependencies","download_stats"]}},"required":["skill","release"]}}}}}}},"/v1/me/skills":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Skills in namespaces the user is a member of","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"owner_setup":{"type":"object","properties":{"status":{"type":"string","enum":["not_selling","incomplete","selling"]},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["status","missing_requirements"]}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total"]}},"required":["namespace","slug","title","summary","background_image_url","updated_at","author","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/me/bought-skills":{"get":{"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Skills purchased by the current user","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"owner_setup":{"type":"object","properties":{"status":{"type":"string","enum":["not_selling","incomplete","selling"]},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["status","missing_requirements"]}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total"]}},"required":["namespace","slug","title","summary","background_image_url","updated_at","author","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/namespaces/{slug}/skills":{"get":{"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":64},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"Public skills in a namespace","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"background_image_url":{"type":"string","nullable":true,"format":"uri"},"updated_at":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["user_id","display_name","google_picture"]},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"owner_setup":{"type":"object","properties":{"status":{"type":"string","enum":["not_selling","incomplete","selling"]},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["status","missing_requirements"]}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total"]}},"required":["namespace","slug","title","summary","background_image_url","updated_at","author","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}}}}}}},"/v1/users/{user_id}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"user_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"User profile with paginated authored skills","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["id","display_name","google_picture"]},"skills":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"updated_at":{"type":"string"},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","title","summary","updated_at","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}},"required":["user","skills"]}}}}}}},"/v1/user/{user_id}":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"user_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"per_page","in":"query"}],"responses":{"200":{"description":"User profile with paginated authored skills","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"display_name":{"type":"string","nullable":true},"google_picture":{"type":"string","nullable":true,"format":"uri"}},"required":["id","display_name","google_picture"]},"skills":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"updated_at":{"type":"string"},"sale":{"type":"object","properties":{"is_for_sale":{"type":"boolean"},"selling_description_md":{"type":"string"},"pricing_mode":{"type":"string","nullable":true,"enum":["fixed_usd","fixed_ton"]},"price_usd":{"type":"string","nullable":true},"price_ton":{"type":"string","nullable":true},"price_ton_nano":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sold_total":{"type":"integer","minimum":0},"can_buy":{"type":"boolean"}},"required":["is_for_sale","selling_description_md","pricing_mode","price_usd","price_ton","price_ton_nano","sold_total","can_buy"]}},"required":["namespace","slug","title","summary","updated_at","sale"]}},"has_more":{"type":"boolean"}},"required":["page","per_page","items","has_more"]}},"required":["user","skills"]}}}}}}},"/v1/files/{id}/download":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"302":{"description":"Tracks download event and redirects to the file URL (public R2 URL when configured, otherwise internal stream endpoint)."}}}},"/v1/files/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Download a file (streams from R2)","content":{"application/zip":{"schema":{"nullable":true}}}}}}}}}