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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with platform:team scope (see Authorization)

  • Range
    string

    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_ids
    array

    Only return teams with the requested ids.

    Example: 561714159547269773,561714159547269774

  • user_ids
    array

    Only return teams with the requested users.

    Example: 375143143408309123,375143143408309124

  • disciplines
    array

    Only return teams with the requested disciplines.

    Example: leagueoflegends,fifa19

  • custom_identifiers
    array

    Only return teams with the requested custom identifiers.

    Example: acme:team:1234,acme:team:1235

  • min_members
    integer

    Only return teams with a minimum number of members.

  • max_members
    integer

    Only return teams with a maximum number of members.

  • invitation_token
    string

    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)
  • id
    string

    Unique identifier of the team.

    Example: "561714159547269773"

  • name
    string

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • discipline
    string

    Discipline of the team. A team can only have one discipline.

    Example: "brawl_stars"

  • user_owner
    object

    Owner of the team.

  • custom_identifier
    string

    The custom team identifier

    Example: "acme:team:1234"

  • invitation_token
    string

    Invitation token of the team.

    Max. length: 12 characters

    Example: "3To8ugVG-L8"

  • member_count
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    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)
  • name
    string

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • discipline
    string

    Discipline of the team. A team can only have one discipline.

    Example: "brawl_stars"

  • user_owner
    object

    Owner of the team.

  • custom_identifier
    string

    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)
  • id
    string

    Unique identifier of the team.

    Example: "561714159547269773"

  • name
    string

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • discipline
    string

    Discipline of the team. A team can only have one discipline.

    Example: "brawl_stars"

  • user_owner
    object

    Owner of the team.

  • custom_identifier
    string

    The custom team identifier

    Example: "acme:team:1234"

  • invitation_token
    string

    Invitation token of the team.

    Max. length: 12 characters

    Example: "3To8ugVG-L8"

  • member_count
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with platform:team scope (see Authorization)

Path parameters

  • id
    string

    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)
  • id
    string

    Unique identifier of the team.

    Example: "561714159547269773"

  • name
    string

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • discipline
    string

    Discipline of the team. A team can only have one discipline.

    Example: "brawl_stars"

  • user_owner
    object

    Owner of the team.

  • custom_identifier
    string

    The custom team identifier

    Example: "acme:team:1234"

  • invitation_token
    string

    Invitation token of the team.

    Max. length: 12 characters

    Example: "3To8ugVG-L8"

  • member_count
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with platform:team scope (see Authorization)

Path parameters

  • id
    string

    The id of the requested team.

Query Parameters

  • regenerate_token
    integer

    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)
  • name
    string

    Optional

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • user_owner
    object

    Optional

    Owner of the team.

  • custom_identifier
    string

    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)
  • id
    string

    Unique identifier of the team.

    Example: "561714159547269773"

  • name
    string

    Name of the team.

    Max. length: 40 characters

    Example: "My team ID"

  • discipline
    string

    Discipline of the team. A team can only have one discipline.

    Example: "brawl_stars"

  • user_owner
    object

    Owner of the team.

  • custom_identifier
    string

    The custom team identifier

    Example: "acme:team:1234"

  • invitation_token
    string

    Invitation token of the team.

    Max. length: 12 characters

    Example: "3To8ugVG-L8"

  • member_count
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with platform:team scope (see Authorization)

Path parameters

  • id
    string

    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

[204] Success