API Documentation



The base URL for all REST requests is https://yabl.xyz/api

/api/whoami 
Method: GET
Authorization: User Token
Returns information about a user token. 
						
							> GET /api/whoami
							< 200
							< {"admin": true,
							<  "avatar": "e4cafdbf4cae648e2883560a426838f7",
							<  "discriminator": "4738",
							<  "flags": 768,
							<  "id": "153353572711530496",
							<  "locale": "en-US",
							<  "mfa_enabled": true,
							<  "premium_type": 1,
							<  "username": "! craftxbox"}
						
					

/api/token/invalidate 
Method: POST
Authorization: API Token
Invalidates an API token. 
						
							> POST /api/token/invalidate
							< 200
							< Token invalidated belonging to 153353572711530496
						
					

/api/token/generate 
Method: POST
Authorization: User Token
Generates or returns an API token. 
						
							> POST /api/token/generate
							< 200
							< F6Uh8DqwjiK32ajFGK2AzucTJFn6fKqIscCoGoYYlXcDd4FpGf8JHOqTQkhQAD4m
						
					

/api/bot/ 
Method: GET
Authorization: None
Returns a bot object. 
						
							> GET /api/bot/321493510241124363
							< 200
							< {"id": "321493510241124363",
							<  "prefix": "c;",
							<  "help": "c;help",
							<  "desc": "Craftxbot is a...",
							<  "body": "# Craftxbot  ... ",
							<  "website": "https://craftxbot.discord.bot",
							<  "support": "https://discord.gg/jcYq5ch",
							<  "git": null,
							<  "library": "Discord4J",
							<  "modnote": null,
							<  "verified": true,
							<  "owners": {
							<     "153353572711530496": "! craftxbox#4738"
							<  },
							<  "username": "craftxbot",
							<  "avatar": "6f12e0c5f5270a9dcf3104ba7fc651cc",
							<  "guildCount": 418}
						
					

/api/bot/:id/add 
Method: POST
Authorization: User token
Submits a new bot. 
						
							> POST /api/bot/0/add
							> {"id": "321493510241124363",
							>  "prefix": "c;",
							>  "help": "c;help",
							>  "desc": "Craftxbot is a...",
							>  "body": "# Craftxbot  ... ",
							>  "website": "https://craftxbot.discord.bot",
							>  "support": "https://discord.gg/jcYq5ch",
							>  "git": null,
							>  "library": "Discord4J",
							>  "modnote": null}
							< 201
							< <the previous document>
						
					

/api/bot/:id/edit 
Method: POST
Authorization: User token
Edits an existing bot. 
						
							> POST /api/bot/321493510241124363/edit
							> {"id": "321493510241124363",
							>  "prefix": "c;",
							>  "help": "c;help",
							>  "desc": "Craftxbot is a...",
							>  "body": "# Craftxbot  ... ",
							>  "website": "https://craftxbot.discord.bot",
							>  "support": "https://discord.gg/jcYq5ch",
							>  "git": null,
							>  "library": "Discord4J",
							>  "modnote": null}
							< 200
							< <the previous document>
						
					

/api/bot/:id/stats 
Method: POST
Authorization: API token
Changes bot guild statistics. 
						
							> POST /api/bot/321493510241124363/stats
							> {"guildCount": 418}
							< 200
							< <bot object>
						
					

/api/bot/:id/delete 
Method: POST
Authorization: User token
Deletes a bot. 
						
							> POST /api/bot/321493510241124363/delete
							< 200
							< Bot deleted.
						
					

/api/bot/:id/verify 
Method: POST
Authorization: Administrator user token
Verifies a bot. 
						
							> POST /api/bot/321493510241124363/verify
							< 200
							< Bot verified.
						
					

/api/bots 
Method: GET
Authorization: None
Returns 20 random bots. 
						
							> GET /api/bots
							< 200
							< <an array of bot objects>
						
					

/api/bots/user/@me 
Method: GET
Authorization: User token
Returns all of your bots, aswell as information about you. 
						
							> GET /api/bots/user/@me
							< 200
							< {"id": "153353572711530496",
							<  "userscrim": "! craftxbox#4738",
							<  "avatar": "e4cafdbf4cae648e2883560a426838f7",
							<  "bots": [<bot object>]}
						
					

/api/bots/user/ 
Method: GET
Authorization: None
Returns all of a users bots, aswell as information about them. 
						
							> GET /api/bots/user/153353572711530496
							< 200
							< {"id": "153353572711530496",
							<  "userscrim": "! craftxbox#4738",
							<  "avatar": "e4cafdbf4cae648e2883560a426838f7",
							<  "bots": [<bot object>]}
						
					

/api/bots/all 
Method: GET
Authorization: Any token
Returns an array of every bot on the list. 
						
							> GET /api/bots/all
							< 200
							< [<bot object>]
						
					

/api/bots/page 
Method: GET
Authorization: None
Searches for bots matching a query, Paginated to 20 bots per page. 
						
							> GET /api/bots/page
							> {"search": "craftxbot", "page": 0}
							< 200
							< {"results": 1,
							<  "pages": 0,
							<  "bots": [<bot object>]}
						
					

/api/bots/unverified 
Method: GET
Authorization: Any token
Returns unverified bots, paginated to 20 bots per page 
						
							> GET /api/bots/unverified
							> {"page": 0}
							< 200
							< {"results": 1,
							<  "pages": 0,
							<  "bots": [<bot object>]}
						
					

/api/whoami
/api/token/invalidate
/api/token/generate
/api/bot/
/api/bot/add
/api/bot/edit
/api/bot/stats
/api/bot/delete
/api/bot/verify
/api/bots/
/api/bots/user/@me
/api/bots/user/
/api/bots/all
/api/bots/page
/api/bots/unverified