Skip to main content
PATCH
Update Blob Object Settings
Changes the settings of one object without touching its bytes. Send only the fields to change. Changing visibility to public makes the object reachable at its public url; changing it to private removes that URL. Sending null restores the default of a field. Scope: blob:write.
string
required
The object ID.
string
public or private.
string | null
immutable, max-age=<seconds> or no-cache (Enterprise-26 or higher). null restores the default.
string | null
inline or attachment. null restores the default.
string | null
Name suggested on download. null uses the last segment of path.
string | null
ISO 8601 timestamp for deletion, at least the plan’s minimum from now. null removes the expiration.
object
Keys to set. A key with the value null is removed. Up to 5 keys in total, 512 bytes; Enterprise-12 or higher.
string
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

object
The updated blob object.

Error Responses

string
The error code indicating the reason for failure. Possible values:
  • AUTH_TOKEN_MISSING (401): No Authorization header 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:read or blob:write); details.required names it.
  • WORKSPACE_PERMISSION_DENIED (403): Only with workspace_id: you’re not a member, or your role lacks the blob permission.
  • WORKSPACE_NOT_FOUND (404): Only with workspace_id: no workspace with that ID, or you’re not a member.
  • 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.path names the field.
  • BLOB_OBJECT_NOT_FOUND (404): No object with that ID in this account (or the workspace’s blob).
  • PLAN_RESTRICTED_FEATURE (403): The plan doesn’t include the setting you sent, such as metadata below Enterprise-12 or no-cache below Enterprise-26.