dambel

دمبل

shevron
ورود | ثبت نام

API Docs / gyms / admins / update



PUT /api/v1/gyms/{gym-id}/admins/{admin-id}

Updates a gym admin's information. All parameters are optional; only provided fields will be updated. You can set fields to null to clear them.


Permissions

PermissionDescription
gym_admins.updateUpdate gym admins of your own gyms
gym_admins.update_anyUpdate gym admins for any gym (admin only)

Path Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym123
admin-idintYesID of the admin to update5

Request Body Parameters

NameTypeRequiredDescriptionExample
titlestringNoTitle of the admin (max 255 characters)"Manager"
permissionsstring arrayNoList of permission names for the admin["edit_gym", "view"]

Request Example

{
  "title": "Manager",
  "permissions": ["edit_gym", "view"]
}

Response

200 OK

Returns the updated gym admin resource.

Example

{
  "id": 1,
  "gym_id": 123,
  "title": "Manager",
  "user_id": 42,
  "permissions": ["edit_gym", "view"]
}

For a full schema, see Gym Admin Resource.


Error Responses

StatusDescriptionReference
422Validation errorValidation error
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube