TOURNAMENTSUITE
TOURNAMENTSUITE
Developer Documentation
Get StartedPaginationResponse CodesRate LimitsWebhooks
Overview

Response Codes

HTTP status codes returned by the Tournament Suite API and how to handle them.

The Tournament Suite API uses standard HTTP status codes to indicate whether a request succeeded or failed.

Success codes

CodeMeaningWhen it occurs
200 OKRequest succeededGET, PATCH, DELETE, and most POST operations
201 CreatedResource createdPOST that creates a new resource

All successful responses share a consistent JSON envelope:

{
  "success": true,
  "data": { "id": "550e8400-e29b-41d4-a716-446655440000" },
  "message": "Resource updated successfully"
}

data holds the resource (or resources) returned by the endpoint; message is a short, human-readable summary of what happened.

Client error codes

CodeMeaningCommon causes
400 Bad RequestInvalid request body or parametersMissing required fields, type errors
401 UnauthorizedAuthentication failedMissing or invalid API key / expired token
403 ForbiddenAuthenticated but not authorizedAPI key missing a required scope, accessing another project's data
404 Not FoundResource does not existWrong ID, deleted resource
409 ConflictState conflictDuplicate registration, resource already in that state
422 Unprocessable EntityValidation failedBusiness rule violation (e.g. tournament already started)
429 Too Many RequestsRate limit exceededCheck X-RateLimit-* and Retry-After headers and back off

Scope-based 403s

Every API key is issued with a fixed set of scopes (for example read:tournaments, read:matches, read:teams). If a request targets an endpoint that needs a scope your key wasn't granted, the API returns a 403 Forbidden with a message naming the missing scope(s), such as:

{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "API key is missing required scope(s): read:tournaments",
    "timestamp": "2026-06-01T10:00:00.000Z",
    "path": "/api/v1/tournaments"
  }
}

Check the scopes attached to your API key in the developer portal and reissue a key with the scopes your integration needs.

Server error codes

CodeMeaningWhat to do
500 Internal Server ErrorUnexpected server errorRetry with exponential backoff; contact support if persistent
503 Service UnavailableTemporary outage or maintenanceRetry with exponential backoff

Error response format

All error responses follow a consistent JSON envelope:

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Tournament with ID '550e8400' was not found.",
    "timestamp": "2026-06-01T10:00:00.000Z",
    "path": "/api/v1/tournaments/550e8400"
  },
  "metadata": {
    "timestamp": "2026-06-01T10:00:00.000Z",
    "path": "/api/v1/tournaments/550e8400",
    "method": "GET",
    "statusCode": 404,
    "version": "v1",
    "requestId": "req-abc123def456"
  }
}

error.code is a fixed status-based code (BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, VALIDATION_ERROR, and similar) — it does not vary per resource type. The top-level metadata object is attached alongside error and includes a requestId you can quote when contacting support.

Handling rate limits

Every response includes X-RateLimit-Limit and X-RateLimit-Remaining headers. When you receive a 429, the response also includes a Retry-After header giving the number of seconds to wait before your next request:

const response = await fetch(url, { headers });

if (response.status === 429) {
  const retryAfterSeconds = Number(response.headers.get('Retry-After'));
  const waitMs = retryAfterSeconds * 1000;
  await new Promise(resolve => setTimeout(resolve, waitMs));
  // retry
}

Was this helpful?

Pagination

How to paginate large result sets using the Tournament Suite API.

Rate Limits

How API rate limits work on Tournament Suite and how to stay within them.

On this page

Success codesClient error codesScope-based 403sServer error codesError response formatHandling rate limits