The Challonge API expands tournament creation and control to the programmatic level. You can create tournaments on the fly and report scores directly from your application. This allows you to define score reporting permissions that fit your user model, and provide a more seamless tournament experience for your users.
The API is accessible over a secure connection at https://api.challonge.com/v1/
All interactions with the API require a Challonge account with a verified email address and API key. We support HTTP basic authentication. Username = your Challonge username, Password = your API key. Many clients format these requests as: https://username:[email protected]/v1/...
Or, if you prefer, you can just pass your API key as parameter api_key
to all method calls.
API methods with GET request types are permitted for any tournament, whether belonging to you or not. All other API methods are scoped to tournaments that you either own or have admin access to.
XML or JSON. The extension in your request indicates your desired response. e.g. https://api.challonge.com/v1/tournaments.xml or https://api.challonge.com/v1/tournaments.json - you may also set your request headers to accept application/json, text/xml or application/xml
The following HTTP response codes are issued by the API. All other codes are the result of a request not reaching the application.
200- OK
401- Unauthorized (Invalid API key or insufficient permissions)
404- Object not found within your account scope
406- Requested format is not supported - request JSON or XML only
422- Validation error(s) for create or update method
500- Something went wrong on our end. If you continually receive this, please contact us.
Requests that complete but have validation errors or other issues will return an array of error messages and status code 422. e.g.:
{ "errors": [ "Name can't be blank", "URL can't be blank" ] }
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name can't be blank</error> <error>URL can't be blank</error> </errors>
Index | GET | Retrieve a set of tournaments created with your account. |
Opret | POST | Create a new tournament. |
Show | GET | Retrieve a single tournament record created with your account. |
Update | PUT | Update a tournament's attributes. |
Ødelæg | DELETE | Deletes a tournament along with all its associated records. There is no undo, so use with care! |
Behandle Check-ins | POST | This should be invoked after a tournament's check-in window closes before the tournament is started.
|
Afbryd check-in | POST | When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration). You must first abort check-in, then you may edit those attributes.
|
Start | POST | Start a tournament, opening up first round matches for score reporting. The tournament must have at least 2 participants. |
Færdiggøre | POST | Finalize a tournament that has had all match scores submitted, rendering its results permanent. |
Nulstil | POST | Reset a tournament, clearing all of its scores and attachments. You can then add/remove/edit participants before starting the tournament again. |
Åben for forudsigelser | POST | Sets the state of the tournament to start accepting predictions. Your tournament's 'prediction_method' attribute must be set to 1 (exponential scoring) or 2 (linear scoring) to use this option. Note: Once open for predictions, match records will be persisted, so participant additions and removals will no longer be permitted. |
Index | GET | Retrieve a tournament's participant list. |
Opret | POST | Add a participant to a tournament (up until it is started). |
Bulk Tilføjelse | POST | Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back. |
Show | GET | Retrieve a single participant record for a tournament. |
Update | PUT | Update the attributes of a tournament participant. |
Tjek ind | POST | Checks a participant in, setting checked_in_at to the current time. |
Fortryd indtjekning | POST | Marks a participant as having not checked in, setting checked_in_at to nil. |
Ødelæg | DELETE | If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches. |
Rens | DELETE | Deletes all participants in a tournament. (Only allowed if tournament hasn't started yet) |
Tilfældiggør | POST | Randomize seeds among participants. Only applicable before a tournament has started. |
Index | GET | Retrieve a tournament's match list. |
Show | GET | Retrieve a single match record for a tournament. |
Update | PUT | Update/submit the score(s) for a match. |
Genåben | POST | Reopens a match that was marked completed, automatically resetting matches that follow it |
Markér som undervejs | POST | Sets "underway_at" to the current time and highlights the match in the bracket |
Fjern markering som undervejs | POST | Clears "underway_at" and unhighlights the match in the bracket |
Index | GET | Retrieve a match's attachments. |
Opret | POST | Add a file, link, or text attachment to a match. NOTE: The associated tournament's "accept_attachments" attribute must be true for this action to succeed. |
Show | GET | Retrieve a single match attachment record. |
Update | PUT | Update the attributes of a match attachment. |
Ødelæg | DELETE | Delete a match attachment. |
A Ruby gem provided by us that greatly eases integration with the Challonge API
PHP wrapper class for the Challonge API that utilizes cURL and SimpleXML (author: Tony Drake)
Python bindings for the Challonge API (author: russ-)
Perl Module for interfacing the Challonge API (author: Alex Kerr)
We strongly encourage API users to join the Challonge API Google Group for all API-related notices.