# Update storage settings

> Update customer-owned storage settings. Prefix changes apply to final outputs that have not been uploaded yet. Existing files keep their stored object keys.

```json
{
  "path": "/api/storages/{storageId}",
  "method": "patch",
  "schema": {
    "description": "Update customer-owned storage settings. Prefix changes apply to final outputs that have not been uploaded yet. Existing files keep their stored object keys.",
    "operationId": "updateStorage",
    "parameters": [
      {
        "description": "Storage id",
        "in": "path",
        "name": "storageId",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    ],
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/StorageUpdateParams"
          }
        }
      },
      "description": "Mutable customer storage settings",
      "required": true,
      "x-originalParamName": "request"
    },
    "responses": {
      "204": {
        "description": "The storage was updated successfully"
      },
      "400": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseErrorValidation"
            }
          }
        },
        "description": "Invalid settings or Chunkify-managed storage"
      },
      "401": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseErrorAuthentication"
            }
          }
        },
        "description": "Authentication error: invalid token or subscription inactive"
      },
      "403": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseErrorForbidden"
            }
          }
        },
        "description": "Only a team owner can update storage delivery settings"
      },
      "404": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseErrorNotFound"
            }
          }
        },
        "description": "Storage not found"
      },
      "429": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResponseErrorTooManyRequests"
            }
          }
        },
        "description": "Rate limit exceeded"
      }
    },
    "security": [
      {
        "ProjectAccessToken": []
      }
    ],
    "summary": "Update storage settings",
    "tags": [
      "Storages"
    ]
  }
}
```



```json #/components/schemas/ResponseErrorNotFound
{
  "description": "Error response",
  "properties": {
    "error": {
      "description": "Error response details",
      "properties": {
        "code": {
          "const": 404,
          "description": "Code is the HTTP status code",
          "examples": [
            404
          ],
          "type": "integer"
        },
        "message": {
          "description": "Message is a human-readable error description",
          "examples": [
            "Ressource not found"
          ],
          "type": "string"
        },
        "type": {
          "const": "NotFoundError",
          "description": "Type indicates the error category",
          "enum": [
            "NotFoundError"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ],
      "type": "object"
    },
    "status": {
      "const": "error",
      "description": "Status indicates the response status \"error\"",
      "type": "string"
    }
  },
  "required": [
    "status",
    "error"
  ],
  "type": "object"
}
```



```json #/components/schemas/ResponseErrorTooManyRequests
{
  "description": "Error response",
  "properties": {
    "error": {
      "description": "Error response details",
      "properties": {
        "code": {
          "const": 429,
          "description": "Code is the HTTP status code",
          "examples": [
            429
          ],
          "type": "integer"
        },
        "message": {
          "description": "Message is a human-readable error description",
          "examples": [
            "Rate limit exceeded"
          ],
          "type": "string"
        },
        "type": {
          "const": "TooManyRequestsError",
          "description": "Type indicates the error category",
          "enum": [
            "TooManyRequestsError"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ],
      "type": "object"
    },
    "status": {
      "const": "error",
      "description": "Status indicates the response status \"error\"",
      "type": "string"
    }
  },
  "required": [
    "status",
    "error"
  ],
  "type": "object"
}
```



```json #/components/schemas/StorageUpdateParams
{
  "description": "Mutable customer storage settings. Omitted fields remain unchanged. An explicit null removes the CDN base URL.",
  "properties": {
    "base_prefix": {
      "description": "Object-key prefix for future final job outputs. Existing files keep their stored object keys. Send an empty string to use the bucket root.",
      "examples": [
        "chunkify/"
      ],
      "maxLength": 768,
      "type": "string"
    },
    "cdn_base_url": {
      "description": "Customer-managed HTTPS delivery origin, or null to remove the current value.",
      "examples": [
        "https://media.example.com"
      ],
      "format": "uri",
      "maxLength": 267,
      "nullable": true,
      "type": "string"
    }
  },
  "type": "object"
}
```



```json #/components/schemas/ResponseErrorValidation
{
  "properties": {
    "error": {
      "properties": {
        "code": {
          "const": 400,
          "description": "Code is the HTTP status code",
          "examples": [
            400
          ],
          "type": "integer"
        },
        "message": {
          "description": "Message is a human-readable error description",
          "examples": [
            "Invalid request parameters"
          ],
          "type": "string"
        },
        "type": {
          "const": "ValidationError",
          "description": "Type indicates the error category",
          "enum": [
            "ValidationError"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ],
      "type": "object"
    },
    "status": {
      "const": "error",
      "description": "Status indicates the response status \"error\"",
      "type": "string"
    }
  },
  "required": [
    "status",
    "error"
  ]
}
```



```json #/components/schemas/ResponseErrorAuthentication
{
  "description": "Error response",
  "properties": {
    "error": {
      "description": "Error response details",
      "properties": {
        "code": {
          "const": 401,
          "description": "Code is the HTTP status code",
          "examples": [
            401
          ],
          "type": "integer"
        },
        "message": {
          "description": "Message is a human-readable error description",
          "examples": [
            "Authentication error: invalid token or subscription inactive"
          ],
          "type": "string"
        },
        "type": {
          "const": "AuthenticationError",
          "description": "Type indicates the error category",
          "enum": [
            "AuthenticationError"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ],
      "type": "object"
    },
    "status": {
      "const": "error",
      "description": "Status indicates the response status \"error\"",
      "type": "string"
    }
  },
  "required": [
    "status",
    "error"
  ],
  "type": "object"
}
```



```json #/components/schemas/ResponseErrorForbidden
{
  "properties": {
    "error": {
      "description": "Error response details",
      "properties": {
        "code": {
          "const": 403,
          "description": "Code is the HTTP status code",
          "examples": [
            403
          ],
          "type": "integer"
        },
        "message": {
          "description": "Message is a human-readable error description",
          "examples": [
            "Unauthorized to perform this action"
          ],
          "type": "string"
        },
        "type": {
          "const": "ForbiddenError",
          "description": "Type indicates the error category",
          "enum": [
            "ForbiddenError"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ],
      "type": "object"
    },
    "status": {
      "const": "error",
      "description": "Status indicates the response status \"error\"",
      "type": "string"
    }
  },
  "required": [
    "status",
    "error"
  ]
}
```