Platform API › Users
GET /users
Retrieves all users on the platform. Users are always listed by creation date (descending order).
Resource URL
https://api.toornament.com/platform/v2/users
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:user
scope (see Authorization) - Rangestring
A range of requested items using the
users
unit. The size of the range can not exceed 50. (see Pagination)Example: users=0-49
Query Parameters
- enabledinteger
Whether the participant is enabled.
Possible values: 0, 1
- created_beforestring
A datetime to include all users created before or at the datetime in RFC 3339 format (combined date, time and utc offset).
Format: datetime
Example: 2023-07-18T00:00:00+00:00
- created_afterstring
A datetime to include all users created after or at the datetime in RFC 3339 format (combined date, time and utc offset).
Format: datetime
Example: 2023-07-18T00:00:00+00:00
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
[ { "id": "475141143408399456", "nickname": "Pokap", "email": "[email protected]", "enabled": true, "two_factor_auth_enabled": true, "timezone": "America\/Los_Angeles", "locale": "en_US", "expired_at": null, "created_at": "2023-07-18T00:00:00+00:00", "custom_fields": {} } ]
Structure (collection)
- idstring
Unique identifier of the user.
Example: "475141143408399456"
- nicknamestring
Nickname of the user.
Max. length: 40 characters
Example: "Pokap"
- emailstring
- enabledboolean
Whether the user is enabled. A disabled user still exists but can no longer log in.
Example: true
- two_factor_auth_enabledboolean
Whether the two-factor authentication is enabled.
Example: true
- timezonestring|null
Time zone from the IANA tz database. For more information, please read the Time Zones documentation.
Example: "America/Los_Angeles"
- localestring|null
Locale of the user (combined language ISO 639-1 and country code ISO 3166-1 alpha-2).
Example: "en_US"
- expired_atstring|null
Date/time on which the user account expires (RFC 3339; combined date, time and utc offset).
Format: datetime
- created_atstring
Date/time on which the user was created (RFC 3339; combined date, time and utc offset).
Format: datetime
Example: "2023-07-18T00:00:00+00:00"
- custom_fieldsobject
Values of the custom fields configured on the platform using the machine names as keys. For more information, please read the Custom Fields documentation.
Example: {}
GET /users/{id}
Returns a single user on the platform.
Resource URL
https://api.toornament.com/platform/v2/users/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:user
scope (see Authorization)
Path parameters
- idstring
The id of the requested user.
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": "475141143408399456", "nickname": "Pokap", "email": "[email protected]", "enabled": true, "two_factor_auth_enabled": true, "timezone": "America\/Los_Angeles", "locale": "en_US", "expired_at": null, "created_at": "2023-07-18T00:00:00+00:00", "custom_fields": {} }
Structure (object)
- idstring
Unique identifier of the user.
Example: "475141143408399456"
- nicknamestring
Nickname of the user.
Max. length: 40 characters
Example: "Pokap"
- emailstring
- enabledboolean
Whether the user is enabled. A disabled user still exists but can no longer log in.
Example: true
- two_factor_auth_enabledboolean
Whether the two-factor authentication is enabled.
Example: true
- timezonestring|null
Time zone from the IANA tz database. For more information, please read the Time Zones documentation.
Example: "America/Los_Angeles"
- localestring|null
Locale of the user (combined language ISO 639-1 and country code ISO 3166-1 alpha-2).
Example: "en_US"
- expired_atstring|null
Date/time on which the user account expires (RFC 3339; combined date, time and utc offset).
Format: datetime
- created_atstring
Date/time on which the user was created (RFC 3339; combined date, time and utc offset).
Format: datetime
Example: "2023-07-18T00:00:00+00:00"
- custom_fieldsobject
Values of the custom fields configured on the platform using the machine names as keys. For more information, please read the Custom Fields documentation.
Example: {}
PATCH /users/{id}
Update a single user on the platform.
Resource URL
https://api.toornament.com/platform/v2/users/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:user
scope (see Authorization)
Path parameters
- idstring
The id of the requested user.
Query Parameters
- custom_field_requiredinteger
Whether the custom fields configured as required should be required during this request.
Possible values: 0, 1
Default: 0
Request Body
Data to provide to update a user.
Example
{ "nickname": "Pokap", "email": "[email protected]", "enabled": true, "two_factor_auth_enabled": true, "timezone": "America\/Los_Angeles", "locale": "en_US", "custom_fields": {} }
Structure (object)
- nicknamestring
Optional
Nickname of the user.
Max. length: 40 characters
Example: "Pokap"
- emailstring
- enabledboolean
Optional
Whether the user is enabled. A disabled user still exists but can no longer log in.
Example: true
- expired_atstring|null
Optional
Date/time on which the user account expires (RFC 3339; combined date, time and utc offset).
Format: datetime
- two_factor_auth_enabledboolean
Optional
Whether the two-factor authentication is enabled.
Example: true
- timezonestring|null
Optional
Time zone from the IANA tz database. For more information, please read the Time Zones documentation.
Example: "America/Los_Angeles"
- localestring|null
Optional
Locale of the user (combined language ISO 639-1 and country code ISO 3166-1 alpha-2).
Example: "en_US"
- custom_fieldsobject
Optional
Values of the custom fields configured on the platform using the machine names as keys. For more information, please read the Custom Fields documentation.
Example: {}
Response
[200] Success.
Example
{ "id": "475141143408399456", "nickname": "Pokap", "email": "[email protected]", "enabled": true, "two_factor_auth_enabled": true, "timezone": "America\/Los_Angeles", "locale": "en_US", "expired_at": null, "created_at": "2023-07-18T00:00:00+00:00", "custom_fields": {} }
Structure (object)
- idstring
Unique identifier of the user.
Example: "475141143408399456"
- nicknamestring
Nickname of the user.
Max. length: 40 characters
Example: "Pokap"
- emailstring
- enabledboolean
Whether the user is enabled. A disabled user still exists but can no longer log in.
Example: true
- two_factor_auth_enabledboolean
Whether the two-factor authentication is enabled.
Example: true
- timezonestring|null
Time zone from the IANA tz database. For more information, please read the Time Zones documentation.
Example: "America/Los_Angeles"
- localestring|null
Locale of the user (combined language ISO 639-1 and country code ISO 3166-1 alpha-2).
Example: "en_US"
- expired_atstring|null
Date/time on which the user account expires (RFC 3339; combined date, time and utc offset).
Format: datetime
- created_atstring
Date/time on which the user was created (RFC 3339; combined date, time and utc offset).
Format: datetime
Example: "2023-07-18T00:00:00+00:00"
- custom_fieldsobject
Values of the custom fields configured on the platform using the machine names as keys. For more information, please read the Custom Fields documentation.
Example: {}
DELETE /users/{id}
Delete a user on the platform.
Resource URL
https://api.toornament.com/platform/v2/users/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
platform:user
scope (see Authorization)
Path parameters
- idstring
The id of the requested user.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.