Platform API › Teams
GET /teams
Retrieves all the teams on the platform. Teams are always listed by creation date (descending order).
Resource URL
https://api.toornament.com/platform/v2/teams
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:team
scope (see Authorization) - Rangestring
A range of requested items using the
teams
unit. The size of the range can not exceed 50. (see Pagination)Example: teams=0-49
Query Parameters
- team_idsarray
Only return teams with the requested ids.
Example: 561714159547269773,561714159547269774
- user_idsarray
Only return teams with the requested users.
Example: 375143143408309123,375143143408309124
- disciplinesarray
Only return teams with the requested disciplines.
Example: leagueoflegends,fifa19
- custom_identifiersarray
Only return teams with the requested custom identifiers.
Example: acme:team:1234,acme:team:1235
- min_membersinteger
Only return teams with a minimum number of members.
- max_membersinteger
Only return teams with a maximum number of members.
- invitation_tokenstring
Only return a list containing the team that has this invitation token.
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
[ { "id": "561714159547269773", "name": "My team ID", "discipline": "brawl_stars", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234", "invitation_token": "3To8ugVG-L8", "member_count": 3 } ]
Structure (collection)
- idstring
Unique identifier of the team.
Example: "561714159547269773"
- namestring
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- disciplinestring
Discipline of the team. A team can only have one discipline.
Example: "brawl_stars"
- user_ownerobject
Owner of the team.
- custom_identifierstring
The custom team identifier
Example: "acme:team:1234"
- invitation_tokenstring
Invitation token of the team.
Max. length: 12 characters
Example: "3To8ugVG-L8"
- member_countinteger
Number of members in the team.
Example: 3
POST /teams
Creates a new team on the platform.
Resource URL
https://api.toornament.com/platform/v2/teams
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:team
scope (see Authorization)
Query Parameters
This endpoint does not have any query parameters.
Request Body
Data to provide to create a team.
Example
{ "name": "My team ID", "discipline": "brawl_stars", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234" }
Structure (object)
- namestring
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- disciplinestring
Discipline of the team. A team can only have one discipline.
Example: "brawl_stars"
- user_ownerobject
Owner of the team.
- custom_identifierstring
The custom team identifier
Example: "acme:team:1234"
Response
[201] Success.
Example
{ "id": "561714159547269773", "name": "My team ID", "discipline": "brawl_stars", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234", "invitation_token": "3To8ugVG-L8", "member_count": 3 }
Structure (object)
- idstring
Unique identifier of the team.
Example: "561714159547269773"
- namestring
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- disciplinestring
Discipline of the team. A team can only have one discipline.
Example: "brawl_stars"
- user_ownerobject
Owner of the team.
- custom_identifierstring
The custom team identifier
Example: "acme:team:1234"
- invitation_tokenstring
Invitation token of the team.
Max. length: 12 characters
Example: "3To8ugVG-L8"
- member_countinteger
Number of members in the team.
Example: 3
GET /teams/{id}
Returns a single team on the platform.
Resource URL
https://api.toornament.com/platform/v2/teams/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:team
scope (see Authorization)
Path parameters
- idstring
The id of the requested team.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
{ "id": "561714159547269773", "name": "My team ID", "discipline": "brawl_stars", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234", "invitation_token": "3To8ugVG-L8", "member_count": 3 }
Structure (object)
- idstring
Unique identifier of the team.
Example: "561714159547269773"
- namestring
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- disciplinestring
Discipline of the team. A team can only have one discipline.
Example: "brawl_stars"
- user_ownerobject
Owner of the team.
- custom_identifierstring
The custom team identifier
Example: "acme:team:1234"
- invitation_tokenstring
Invitation token of the team.
Max. length: 12 characters
Example: "3To8ugVG-L8"
- member_countinteger
Number of members in the team.
Example: 3
PATCH /teams/{id}
Updates a single team on the platform.
Resource URL
https://api.toornament.com/platform/v2/teams/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:team
scope (see Authorization)
Path parameters
- idstring
The id of the requested team.
Query Parameters
- regenerate_tokeninteger
Generate a new invitation token during the process.
Possible values: 0, 1
Default: 0
Request Body
Data to provide to update the team.
Example
{ "name": "My team ID", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234" }
Structure (object)
- namestring
Optional
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- user_ownerobject
Optional
Owner of the team.
- custom_identifierstring
Optional
The custom team identifier
Example: "acme:team:1234"
Response
[200] Success.
Example
{ "id": "561714159547269773", "name": "My team ID", "discipline": "brawl_stars", "user_owner": { "id": "375143143408309123", "nickname": "Thresh" }, "custom_identifier": "acme:team:1234", "invitation_token": "3To8ugVG-L8", "member_count": 3 }
Structure (object)
- idstring
Unique identifier of the team.
Example: "561714159547269773"
- namestring
Name of the team.
Max. length: 40 characters
Example: "My team ID"
- disciplinestring
Discipline of the team. A team can only have one discipline.
Example: "brawl_stars"
- user_ownerobject
Owner of the team.
- custom_identifierstring
The custom team identifier
Example: "acme:team:1234"
- invitation_tokenstring
Invitation token of the team.
Max. length: 12 characters
Example: "3To8ugVG-L8"
- member_countinteger
Number of members in the team.
Example: 3
DELETE /teams/{id}
Deletes a single team from the platform.
Resource URL
https://api.toornament.com/platform/v2/teams/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:team
scope (see Authorization)
Path parameters
- idstring
The id of the requested team.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.