---
title: "Update User Lifecycle Rule"
method: PATCH
path: "/user_lifecycle_rules/{id}"
tags: ["user_lifecycle_rules", "User Lifecycle Rules"]
---

# Update User Lifecycle Rule

`PATCH /user_lifecycle_rules/{id}`

Update User Lifecycle Rule

## Path parameters

- `id` integer, required

## Response `200`

The UserLifecycleRules object.

- UserLifecycleRuleEntity — UserLifecycleRuleEntity model
  - `id` integer — User Lifecycle Rule ID
  - `authentication_method` 'all' | 'password' | 'sso' | 'none' | 'email_signup' | 'password_with_imported_hash' | 'password_and_ssh_key' | 'all_non_sso' — User authentication method for which the rule will apply. Use `all_non_sso` to target every non-SSO authentication method with one rule.
  - `group_ids` integer[] — Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
  - `action` 'disable' | 'delete' — Action to take on inactive users (disable or delete)
  - `inactivity_days` integer — Number of days of inactivity before the rule applies
  - `include_folder_admins` boolean — If true, the rule will apply to folder admins.
  - `include_site_admins` boolean — If true, the rule will apply to site admins.
  - `apply_to_all_workspaces` boolean — If true, a default-workspace rule also applies to users in all workspaces.
  - `name` string — User Lifecycle Rule name
  - `notify_users` boolean — If true, users will be emailed before the rule disables or deletes them.
  - `partner_tag` string — If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
  - `site_id` integer — Site ID
  - `workspace_id` integer — Workspace ID. `0` means the default workspace.
  - `user_state` 'inactive' | 'disabled' — State of the users to apply the rule to (inactive or disabled)
  - `user_tag` string — If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests

---

[API](https://skmtc.net/files/apis/files-com-api.md) · [All operations](https://skmtc.net/files/apis/files-com-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/files/files-com-api/versions/c80c746637fd/schema)
