---
title: "Update Behavior"
method: PATCH
path: "/behaviors/{id}"
tags: ["behaviors", "Behaviors"]
---

# Update Behavior

`PATCH /behaviors/{id}`

Update Behavior

## Path parameters

- `id` integer, required

## Response `200`

The Behaviors object.

- BehaviorEntity — BehaviorEntity model
  - `id` integer — Folder behavior ID
  - `path` string — Folder path. Note that Behavior paths cannot be updated once initially set. You will need to remove and re-create the behavior on the new path.
  - `attachment_url` string — URL for attached file
  - `behavior` 'webhook' | 'file_expiration' | 'auto_encrypt' | 'lock_subfolders' | 'storage_region' | 'serve_publicly' | 'create_user_folders' | 'inbox' | 'limit_file_extensions' | 'limit_file_regex' | 'amazon_sns' | 'watermark' | 'remote_server_mount' | 'slack_webhook' | 'auto_decrypt' | 'override_upload_filename' | 'permission_fence' | 'limit_filename_length' | 'organize_files_into_subfolders' | 'teams_webhook' | 'google_pub_sub' | 'archive_overwritten_or_deleted_files' | 'auto_recrypt' | 'metadata_category' | 'auto_unzip' | 'remote_server_metadata_index' | 'malware_scanning' — Behavior type.
  - `name` string — Name for this behavior.
  - `description` string — Description for this behavior.
  - `value` object — Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
  - `public_hosting_url` string — Public URL for this publicly hosted folder when the `Serve Publicly` behavior has a key configured. When a Custom Domain with `public_hosting` destination is attached to this behavior, the URL uses that domain. Otherwise it uses the site's `subdomain.hosted-by-files.com` host.
  - `disable_parent_folder_behavior` boolean — If true, the parent folder's behavior will be disabled for this folder and its children.
  - `recursive` boolean — Whether this behavior is recursive for this record. `always` behaviors are always `true`, `never` behaviors are always `false`, and `sometimes` behaviors may be either value.
  - `inherited` boolean — If true, this behavior is inherited from a higher scope rather than owned by the requested workspace.
  - `managed` boolean — If true, this behavior is controlled by a parent-site policy and cannot be modified locally.
  - `root_behavior_site_admin_only` boolean — If true, this behavior may only be modified by a site admin because it is at the site root or disables a root behavior.

## 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)
