API Documentation
Here you can find all the various documentation for the free API we provide to allow you to interact with the ServerDex servers.
API Key
You can find your API Key under 'Edit Server' in the Dashboard. Each Server on ServerDex has a unique API Key. This means you can only query the server directly related to the API Key.
Here is an example API Key - 11aa1111-1aa1-1a11-1a11-11aa11a111a1
---Vote Check
We provide an API endpoint that allows you to check (a callback) for the vote_id you provided to ServerDex. This will only return a vote done within the 24 hour period of UTC.
Endpoint - https://serverdex.org/api/v1/votecheck
Name | Value | Description | Additional |
---|---|---|---|
key | String | API Key provided in 'Edit Server'. This is used to identify you accessing your server and provides security. | Required |
vote_id | String | The vote_id you provided to the user when they did a vote on ServerDex. | Required |
Successful Response
Code | Body |
---|---|
200 |
|
Error Response
Code | Body |
---|---|
This error is designed to show you that the key parameter is missing from your API request. | |
400 |
|
This error is designed to show you that the key parameter is invalid from your API request. Please check the API key for errors. | |
401 |
|
This error is designed to show you that the vote_id parameter is missing from your API request. | |
400 |
|
This error is designed to show you that the vote_id parameter has no matching vote_id in our system from your API request. This most likely means the user has not voted yet. | |
404 |
|
Vote Claim
This endpoint is to have a second source verify that a vote has been claimed, or allow you to run a service that is serverless. You can simply send requests to our endpoints and use our database as if it were your own for tracking votes and rewarding users.
Endpoint - https://serverdex.org/api/v1/voteclaim
Name | Value | Description | Additional |
---|---|---|---|
key | String | API Key provided in 'Edit Server'. This is used to identify you accessing your server and provides security. | Required |
vote_id | String | The vote_id you provided to the user when they did a vote on ServerDex. | Required |
Successful Response
Code | Body |
---|---|
200 |
|
Error Response
Code | Body |
---|---|
403 |
|
This error is designed to show you that the vote_id has already been claimed from your API request. | |
401 |
|
This error is designed to show you that the key parameter is invalid from your API request. Please check the API key for errors. | |
401 |
|