Skip to main content
PUT
string
required
The API key for your account. You can find this in your account settings.
Update Settings saves your rules, each applying to the files under a prefix. A rule sets defaults and limits once, for every upload under it, whether it comes from your backend, an upload token or the dashboard. Requires the blob:write scope and a paid plan. Each plan allows a number of rules: 5 on Hobby and Standard, 10 on Pro and 20 on Enterprise. Rules saved before a downgrade keep applying, but the next save must fit the new plan. The request replaces the whole list: send every rule you want to keep, and {"rules": []} removes them all. When several rules match a file, the one with the longest prefix wins.
  • Defaults (private, expire, cache_control) apply when the upload doesn’t set its own value.
  • Limits (max_size, extensions) refuse uploads outside them with FILE_TOO_LARGE or FILE_TYPE_NOT_ALLOWED. They apply to REST uploads, not to the S3 gateway.
  • Automatic deletion (delete_after_days) deletes files a number of days after they were written. It applies to every file under the prefix, including files that already existed and files written over S3.
Automatic deletion only starts 24 hours after the rule is saved (active_from in Get Settings), so you have a day to catch a prefix that is broader than intended. Saving an unchanged rule again keeps its original date. Once active, deleted files can’t be recovered.
object[]
required
Up to 5 rules on Hobby and Standard, 10 on Pro and 20 on Enterprise.
If the plan changes to one that doesn’t include a rule’s option (for example an expiry under 7 days after leaving Enterprise), uploads under that prefix are refused with UPGRADE_REQUIRED until the rule is changed.

Rate limits

10 requests per minute (RATE_LIMITED, 429).

Response

Returns the saved rules, in the same shape as Get Settings.

Errors

Errors about one rule include its prefix in the response.