For Developers

Update Team Role

PATCH https://ed.link/api/v2/teams/:team_id/roles/:team_role_id

Updates properties of a custom team role. Built-in managed roles cannot be modified.

Permissions

Requires the team_roles.update system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:team_role_idUUIDYesThe ID of the role.

Request Body

PropertyTypeRequiredDescription
nameStringNoUpdated role name.
descriptionStringNoUpdated description.
permissionsArrayNoUpdated array of permission slugs.

Sample Request

const response = await axios.patch(
    `https://ed.link/api/v2/teams/${team_id}/roles/${team_role_id}`,
    {
        description: 'Read-only access to logs, integrations, and requests'
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`,
            'content-type': 'application/json'
        }
    }
);

Sample Response

{
    "$data": {
        "id": "3b7d4bad-9bdd-2b0d-7b3d-cb6d9b1deb4d",
        "name": "Support Specialist",
        "description": "Read-only access to logs, integrations, and requests"
    }
}