api for registering player