Skip to main content

Users

Listed below are all the user methods, along with their parameters, filters, and includes.
All parameters that contain (*) are required.

Create User

Returns a dict of the new registered user.
If any of the supplied parameters are in the wrong format or are missing, (with the exception of the password), an error will be returned.

Parameters

name: str -> The user name. *
email: str -> The user email. *
password: Optional[str] -> The user password. If a password is not supplied, a random one will be generated.

info

If a random password is generated, this method or the API will NOT return the password. In this case, the user will need to reset their password on the website.

List Users

Returns all users registered in the system, or None if a specific user is not found.
Optionally you can provide Filters and Includes for user query.

Filters & Includes

name: str -> The user name.
email: str -> The user email.
server_limit: int -> Limit of user servers.
pterodactyl_id: int -> The Pterodactyl ID of the user.
role: str -> The user role. Available Roles: ['admin', 'moderator', 'client', 'member'].
suspended: bool -> Whether the user is suspended or not.
includes: list -> List of includes. Available Includes: ['servers', 'serversCount', 'notifications', 'notificationsCount', 'payments', 'paymentsCount', 'vouchers', 'vouchersCount', 'discordUser', 'discordUserCount'].

User Details

Returns data for a specific user, or None if the user is not found.
This is useful for checking whether a user has verified his discord account.

Parameters & Includes

id: int -> The user ID. *
includes: list -> List of includes. Available Includes: ['servers', 'serversCount', 'notifications', 'notificationsCount', 'payments', 'paymentsCount', 'vouchers', 'vouchersCount', 'discordUser', 'discordUserCount'].

Update User

Returns a dict with the user updated data.
If the email is in the incorrect format, or the user ID does not exist, one will be returned.

Parameters

id: int -> The user ID. *
name: str -> The new user name. *
email: str -> The new email of the user. *
credits: Optional[int] -> The new user credits.
server_limit: Optional[int] -> The amount of servers user can manage.
role: Optional[str] -> The new user role. Valid Roles: ['admin', 'moderator', 'client', 'member'].

info

For some reason the API forces you to pass the user name and email address in order to update it.

Suspend User

Returns a dict of the user who was suspended.
If the user is already suspended, or, the user ID passed in does not exist, an error will be returned.

Parameters

id: int -> The user ID. *

Unsuspend User

Returns a dict of the user who had his suspension revoked.
If the user is not already suspended, or, the user ID passed in does not exist, an error will be returned.

Parameters

id: int -> The user ID. *

Increment User

Returns a dict of the user who had an increment added.
If the user ID passed in does not exist, or if any parameter has an incorrect value, an error will be returned.

Parameters

id: int -> The user ID. *
credits: int -> The amount of credits that will be added to the user.
server_limit: int -> The amount of server limit that will be added to the user.

info

This method will not overwrite the user's existing server credits or limits, instead the new value will be added to the old one.
The credits and server_limit parameters are not required simultaneously, but one of them must be supplied.

Decrement User

Returns a dict of the user who had an decrement added.
If the user ID passed in does not exist, or if any parameter has an incorrect value, an error will be returned.

Parameters

id: int -> The user ID. *
credits: int -> The amount of credits that will be added to the user.
server_limit: int -> The amount of server limit that will be added to the user.

info

This method will not overwrite the user's existing server credits or limits, instead the new value will be deducted from the old one.
The credits and server_limit parameters are not required simultaneously, but one of them must be supplied.

Delete User

Returns a dict of the user that was deleted.
If the user ID does not exist, an error is returned.

Parameters

id: int -> The user ID. *

danger

Currently this endpoint will delete the user, even if they have servers associated with them, so use this with caution.