Folder rules
Create or Update One Folder Rule
Creates or changes the rule of one folder prefix, leaving the other rules as they are.
PUT
Create or Update One Folder Rule
Creates the rule for one folder prefix or changes it, and leaves the other rules alone. Put the prefix in the URL, URL-encoded (for example
tmp%2F). The response is the whole list with its new etag.
Scope: blob:write.
A rule needs at least one field besides the prefix; an empty rule returns VALIDATION_ERROR.
Default expiration of each new object, in seconds. At least the plan’s minimum expiration (7 days, or 1 hour on Enterprise plans).
Accepted extensions: 1–50 items, each 1–16 lowercase characters (letters and digits), without the dot.
Delete objects this many days after upload, 1–3650. Applies 24 hours after the rule is saved.
The workspace ID, when the blob belongs to a workspace. The call acts on the blob of the workspace owner and needs the
blob:read workspace permission (blob:manage on routes that change data). Leave it out to act on your own blob.Example request
Response
Error Responses
The error code indicating the reason for failure. Possible values:
AUTH_TOKEN_MISSING(401): NoAuthorizationheader was sent.API_KEY_INVALID(401): The API key doesn’t exist, was revoked, or its secret doesn’t match.API_KEY_SCOPE_DENIED(403): The key lacks the scope this route needs (blob:readorblob:write);details.requirednames it.WORKSPACE_PERMISSION_DENIED(403): Only withworkspace_id: you’re a member, but your role lacks the blob permission.WORKSPACE_NOT_FOUND(404): Only withworkspace_id: the workspace was not found.BLOB_NAMESPACE_SUSPENDED(403): The account’s blob storage is suspended, or its plan expired. Uploads and other writes are refused from the start of the 72-hour grace period.VALIDATION_ERROR(400): A parameter or body field failed validation.details.pathnames the field.BLOB_RULE_LIMIT(409): Adding this rule would exceed the plan’s rule limit: 5, 10 or 20.PLAN_RESTRICTED_FEATURE(403):cache_controlisno-cacheon a plan below Enterprise.
Last modified on November 20, 2026