---
title: "Update bucket policy"
method: PUT
path: "/bus/bucket/{name}/policy"
tags: ["bus"]
---

# Update bucket policy

`PUT /bus/bucket/{name}/policy`

Updates the policy of the specified bucket. The policy can be used to configure public read access to the bucket.

## Path parameters

- `name` string, required — The name of the bucket.

## Request body

- object
  - `policy` object
    - `publicReadAccess` boolean — Whether the bucket is publicly readable

## Response `200`

Successfully updated bucket policy

## Other responses

- `400` — Malformed request
- `404` — Bucket not found

## Changes

- **2024-12-18** `922f156353c9` — 1 breaking, 1 info
  - removed the media type `text/plain` for the response with the status `404`
  - api tag `bus` added
- **2024-12-12** `1a4b05c71ba9` — 2 breaking
  - added the pattern `(?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$` to the `path` request parameter `name`
  - removed the media type `text/plain` for the response with the status `200`
- **2024-12-11** `68dff202f6ad` — 1 info
  - endpoint added
- **2024-12-09** `f062c35d8f47` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/siafoundation/apis/renterd-api/changes/bus/bucket/:name/policy/put.md)

---

[API](https://skmtc.dev/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.dev/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/revisions/184a3d5207da/schema)
