Developer Access
API key access is not allowed by default. If you're interested in access, contact support@tournachess.com. Once access is enabled for your account, you can manage API keys and browse the interactive API reference from Settings.
Create a key
After access has been enabled for your account:
- Open Settings, then the API tab and Developer Access card.
- Choose Create API Key and enter a description.
- Select an access level:
- Read only permits GET requests to read data your account can access. It cannot manage API keys, run GET actions that change account data, or obtain reusable credentials.
- Read and write is the default for existing keys and also permits supported registration field updates. Both levels are limited to the supported endpoints below; this setting does not enable other application APIs.
- Optionally set an expiration date. Expired keys cannot authenticate.
- Create the key, copy it, and store it securely. The full secret is shown only once; TournaChess stores a one-way hash.
Use the key in the Authorization: Bearer <your-key> header while API access is enabled for your account. A key does not grant new club roles or bypass account restrictions. Disabled accounts cannot use their keys. Browser sessions take precedence when a request also carries a key.
Supported endpoints
API keys are accepted only for:
-
Endpoints under
/api/v0/public/. These keep their existing public visibility rules, and most work without a key. -
GET /api/v0/tournaments/{tournamentId}for authenticated tournament details, including sections, registrations, and rounds according to your account's permissions. -
PATCH /api/v0/tournaments/{tournamentId}/registrations/{registrationId}/update-fieldwith a read and write key. The key owner must be an Owner, Admin, or Tournament Director in the tournament’s club. Read-only keys receive 401.
Other application endpoints, including other tournament mutations and child endpoints, do not accept API keys. Sign in to Settings to create and manage keys or update your account credentials, and to club settings to manage Guest TD access and payment integrations.
Update a registration’s USCF ID
Get the tournament and registration IDs from authenticated tournament details. Send the following request with Authorization: Bearer <your-key>:
PATCH /api/v0/tournaments/{tournamentId}/registrations/{registrationId}/update-field
Content-Type: application/json
{
"field": "uscfId",
"value": "12345678"
}
Use "" or null as the value to clear the ID. Otherwise send a string of 7–12 digits. The server trims whitespace and rejects duplicate IDs in affected sections. A successful response has success: true and the saved registration in data.registration (the saved ID is cachedUscfId). Errors use { "error": "message" }: 400 for invalid input or a duplicate ID, 401 for a key that cannot authenticate, 403 for insufficient club permissions, 404 for a missing tournament or registration, and 409 for a conflicting identity or pairing edit.
For a guest player, changing the ID also updates the shared guest record and linked registrations, including other events. Other changed registration IDs appear in data.propagatedRegistrationIds. Linked user accounts and profiles are not changed. This PATCH does not fetch the new USCF rating or membership data; use the signed-in UI to refresh all affected players before pairing. The separate rating-refresh endpoint does not accept API keys.
The same endpoint supports other editable registration fields with their existing field-specific validation. See its entry in the API reference for supported fields, examples, and response details.
Read and update a custom registration field
Custom-field answers use the same registration API. Creating fields or changing their names, choices, required status, or scope remains a separate signed-in configuration operation, not an API-key capability.
Read answers with either a read-only or read/write key:
GET /api/v0/tournaments/{tournamentId}
Authorization: Bearer <your-key>
The key owner must be an Owner, Admin, or Tournament Director in the tournament’s club to see these private answers. They are in tournament.sections[].registrations[].customFieldResponses. Each answer includes fieldId, its string value, and field metadata such as the name, type, choices, and required status. For example, this is a response fragment (other fields omitted; IDs illustrative):
{
"tournament": {
"id": "tournament-id",
"sections": [
{
"id": "section-id",
"registrations": [
{
"id": "registration-id",
"customFieldResponses": [
{
"fieldId": "shirt-size-field-id",
"value": "Large",
"field": {
"id": "shirt-size-field-id",
"name": "Shirt size",
"fieldType": "SELECT",
"options": ["Small", "Medium", "Large"],
"required": false
}
}
]
}
]
}
]
}
}
Use the existing field’s actual ID, not its display name. Saved answers supply fieldId; unanswered fields have no response row, so this array is not a complete catalog of configured fields.
With a read and write key, set the answer using the same PATCH endpoint as the USCF example:
PATCH /api/v0/tournaments/{tournamentId}/registrations/{registrationId}/update-field
Authorization: Bearer <your-key>
Content-Type: application/json
{
"field": "customField:shirt-size-field-id",
"value": "Large"
}
Custom-field values must be strings, including numeric answers (for example, "3"), dates (for example, "2026-11-02"), and checkboxes ("true" or "false", not JSON booleans). SELECT answers must match an offered choice. Text is sanitized, and existing type, length, and required-field validation still applies. Non-string input is treated as an empty answer, not converted to text; do not send numbers or booleans.
To clear an optional answer, send the same field with "value": ""; this removes its response row. An applicable required field cannot be cleared, and an applicable required checkbox must remain "true". Successful writes return success: true and data.registration.customFieldResponses; reread tournament details for the saved answers. Unknown fields or fields belonging to another tournament return 404; invalid or missing required answers return 400. Read-only keys cannot PATCH (401), and insufficient club permissions return 403.
Explore the API reference
Open Settings → API, then choose API reference to browse the supported endpoints, inspect schemas, and try requests with your account's permissions. Expand an endpoint's Responses to inspect the response fields and examples, including error bodies. Response shapes vary by endpoint: some return named fields such as tournaments, while others wrap their payload in data with meta. Calendar and PGN downloads describe their text formats. The reference also links to the OpenAPI JSON specification. Both require you to be signed in with an account that has API access. The interactive reference and OpenAPI JSON contain only the supported endpoints above. Some generated request schemas provide only an outline.
Review usage and revoke access
The list shows each key's access level, masked identifier, authenticated request count, last-used date, and expiration. Counts reflect accepted authentications, not necessarily successful endpoint operations; some public read paths deliberately omit persistent usage tracking. TournaChess keeps aggregate statistics, not an unlimited request-history log.
Choose the delete button beside a key to revoke it. Applications using that key will no longer authenticate. Removing API access from your account also prevents existing keys from authenticating. You may have up to 25 active keys. Guest tournament directors cannot create or delete keys.
Existing keys keep their original bearer credentials, expiration, and read/write access when their stored values are migrated to hashes. To change a key's access level, create a replacement and delete the old one.