Making requests
Base API URL:
API Versions
Version | URL | State |
---|---|---|
3 | https://api.boticord.top/v3 | Active |
2 | https://api.boticord.top/v2 | Inactive |
1 | https://api.boticord.top/v1 | Inactive |
Required Params
Any POST & PUT requests should have Content-Type
header with application/json
value.
Otherwise, you will get an HTTP error 500 (UnknownError
).
Authorization & Authentication
Most API methods require specifying an API token within Authorization
header.
Example:
curl -X POST -H 'Authorization: Token' https://api.boticord.top/v3/bots/:id/stats --data-raw '{"servers":100}'
Where Token
is your key.
Getting an API key
Follow these steps to get an API key:
- Go to your profile.
- Click on
settings
icon. - Click on
API
tab. - Click on
Generate
button at the bottom of the page. - Copy your key. This token is valid only for bots and servers owned by the account that generated it
Rate Limits
Warning
If you exceed the request limit, you will be temporarily blocked. In case of abuse, you can get a permanent lock to the resource.
Global rate limit is 25 requests per 10 seconds. If you exceed this limit, you will receive HTTP error 429.
Responses
- Successful response
- Error 4xx/5xx
{ "ok": true, "result": { // some data.... }}
In case of any non-fatal error, the server will send the following data:Property
{ "ok": false, "result": null, "errors": [ { "code": 3, "message": "CriticalError" } ]}
code
this is the error ID from this table. With these numbers it is easy to program a specific response to an error (for example, a translation into human language). These numbers will never change, but new ones may be added. Property message
this is a brief description of the error in English for quick debugging of the error.Error codes
Code | Name | Description |
---|---|---|
0 | InternalServerError | Internal server error |
1 | RateLimited | RateLimited |
2 | NotFound | Not found |
3 | Forbidden | Forbidden |
4 | Unauthorized | Unauthorized |
5 | BadRequest | Bad request |
6 | RpcError | Rpc error |
7 | WsError | Websocket error |
8 | UnknownError | Unknown error |
9 | ThirdPartyFail | Third party failed |
10 | UnknownUser | Unknown user |
11 | ShortLinkTaken | Short link was already taken |
12 | UnknownShortDomain | Unknown short domain |
13 | UnknownLibrary | Unknown library |
14 | TokenInvalid | Token invalid |
15 | UnknownResource | Unknown resource |
16 | UnknownTag | Unknown tag |
17 | PermissionDenied | Permission denied: lack of permissions |
18 | UnknownComment | Unknown comment |
19 | UnknownBot | Unknown bot |
20 | UnknownServer | Unknown server |
21 | UnknownBadge | Unknown badge |
22 | UserAlreadyHasABadge | User already has a badge |
23 | InvalidInviteCode | Invalid invite code |
24 | ServerAlreadyExists | Server already exists |
25 | BotNotPresentOnQueueServer | Bot is not present on queue server |
26 | UnknownUp | Unknown up |
27 | TooManyUps | Too many ups |
28 | InvalidStatus | Invalid status |
29 | UnknownReport | Unknown report |
30 | UnsupportedMediaType | Unsupported media type |
31 | UnknownApplication | Unknown application |
32 | AutomatedRequestsNotAllowed | Automated requests are not allowed |
33 | InvalidRating | Invalid rating |
34 | DuplicateBot | Bot already exists |
35 | CannotDetectIp | Cannot detect requester ip. Looks like network is not configured properly |
36 | ThirdPartyMonitoringFail | Third party monitoring is not available |
37 | ThirdPartyMonitoringNotApproved | Third party monitoring is not approved your application |
38 | TurnstileError | Unknown turnstile captcha error |
39 | ServiceConfiguredIncorrectly | Service is configured incorrectly. Please contact support |
40 | UnknownBoost | Unknown boost |
41 | BoostExpired | Boost expired |
42 | AlreadyCommented | Cannot post a review twice |
43 | ReviewRatingsConflict | Server<->Server conflict in the rating. Comment in DB has too high rating |
44 | TooManyConsecutiveMessages | Too many consecutive messages in chat. |
45 | NoServiceBot | No service bot |
46 | AlreadyReported | Already reported |
47 | CannotDeleteOwner | Cannot delete owner from developers |
48 | BlockedBot | Bot is blocked, unblock it first |
49 | UnknownAutomation | Unknown automation |
50 | OnlyOwnerCanAddServer | Only owner can add server |
51 | ReviewReported | Review has not solved report |
52 | LowPremiumLevel | The premium level is too low |
53 | CaptchaServiceUnavailable | Captcha service is unavailable |
54 | InvalidCaptchaAnswer | Invalid captcha answer |
55 | ResourceNotOwned | Resource is not owned by token owner |
56 | ResourceFetchTimeout | Resource fetch in rate limit |
57 | CannotFetchOwner | Cannot fetch owner |
58 | TooManyCaptchaAttempts | Too many captcha attempts |
59 | EmptyReview | Cannot send empty review |
ResourceStatus
Resource status in BotiCord search
Code | Name | Description |
---|---|---|
0 | Hidden | Staff-only availability |
1 | Public | Publicly available |
2 | Banned | Staff-only availability + any interactions disabled |
3 | Pending | The moderators are checking the resource |
ResourceRating
Resource rating
Property | Type | Description |
---|---|---|
count | number | Ratings count |
rating | number | Rating value (1-5) |