Skip to main content

API Reference

ASCND uses the Connect Protocol for type-safe RPC communication. All endpoints accept JSON and return JSON.

Base URL

https://api.ascnd.gg

Authentication

All API requests require authentication via an API key in the Authorization header:

Authorization: Bearer your_api_key_here

Get your API key from the ASCND Dashboard.

Request Format

All requests use POST method with a JSON body. The endpoint path follows the pattern:

POST /ascnd.v1.AscndService/{MethodName}
Content-Type: application/json

Example Request

curl -X POST https://api.ascnd.gg/ascnd.v1.AscndService/SubmitScore \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"leaderboard_id": "lb_xxx",
"player_id": "player_123",
"score": "50000"
}'
Scores as strings

Large integers (like score) are sent as strings in JSON to preserve precision. The SDK handles this automatically.

Available Endpoints

EndpointDescription
SubmitScoreRecord a player's score
GetLeaderboardRetrieve top scores
GetPlayerRankGet a player's rank

Error Handling

Errors are returned with appropriate HTTP status codes and a JSON body:

{
"code": "invalid_argument",
"message": "leaderboard_id is required"
}

Common Error Codes

CodeHTTP StatusDescription
invalid_argument400Missing or invalid request parameter
unauthenticated401Missing or invalid API key
permission_denied403API key doesn't have access to this resource
not_found404Leaderboard or player not found
resource_exhausted429Rate limit exceeded
internal500Server error

Rate Limits

  • Free tier: 100 requests/minute
  • Pro tier: 1,000 requests/minute
  • Enterprise: Custom limits

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1704067200