@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api MineSkin API
@base https://api.mineskin.org
@version 1.0.0
@auth Bearer bearer
@common_fields {User-Agent: str # Custom User-Agent for your application, see [user-agent.dev](https://user-agent.dev/) for implementation examples}
@endpoints 9
@toc generate(3), get(4), validate(2)

@group generate
@endpoint POST /generate/url
@optional {Authorization: str # API Key - Get your key from https://mineskin.org/apikey}
@returns(200) Successfully generated skin info
@errors {400: Response if an error occurred, 429: Response if the client sent a request too soon, 500: Response if an error occurred}
@example_request {"url":"https://i.imgur.com/kQPrtYw.png","visibility":0,"name":"","variant":"classic"}

@endpoint POST /generate/upload
@optional {Authorization: str # API Key - Get your key from https://mineskin.org/apikey}
@returns(200) Successfully generated skin info
@errors {400: Response if an error occurred, 429: Response if the client sent a request too soon, 500: Response if an error occurred}

@endpoint POST /generate/user
@optional {Authorization: str # API Key - Get your key from https://mineskin.org/apikey}
@returns(200) Successfully generated skin info
@errors {400: Response if an error occurred, 429: Response if the client sent a request too soon, 500: Response if an error occurred}

@endgroup

@group get
@endpoint GET /get/delay
@optional {Authorization: str # API Key - Get your key from https://mineskin.org/apikey}
@returns(200) {millis: int, seconds: int, nextRequest: map{time: int, relative: int}, lastRequest: map{time: int}}

@endpoint GET /get/id/{id}
@desc Deprecated. Use /get/uuid instead.
@required {id: num(integer)}
@returns(200) {id: int, idStr: str, uuid: str, name: str, model: str, variant: str, data: map{uuid: str, texture: map{value: str, signature: str, url: str}}, timestamp: num, duration: num, accountId: int, account: int, server: str, private: bool, views: num} # Skin Info

@endpoint GET /get/uuid/{uuid}
@required {uuid: str(uuid)}
@optional {Authorization: str # API Key - Get your key from https://mineskin.org/apikey}
@returns(200) {id: int, idStr: str, uuid: str, name: str, model: str, variant: str, data: map{uuid: str, texture: map{value: str, signature: str, url: str}}, timestamp: num, duration: num, accountId: int, account: int, server: str, private: bool, views: num} # Skin Info

@endpoint GET /get/list/{page}
@required {page: num(integer) # For reference pagination, the uuid of the last skin in the previous page. For numeric pagination (deprecated), the page number or 'start'.}
@returns(200) {skins: [map], page: map{index: int, amount: int, total: int}, filter: str} # Skin Info List

@endgroup

@group validate
@endpoint GET /validate/name/{name}
@required {name: str}
@returns(200) {valid: bool, uuid: str, name: str} # Validation info about the requested user

@endpoint GET /validate/uuid/{uuid}
@required {uuid: str}
@returns(200) {valid: bool, uuid: str, name: str} # Validation info about the requested user

@endgroup

@end
