---
title: "Bucket Owner update"
method: POST
path: "/v2/storage/branch/{branchId}/buckets/{bucketId}/owner"
tags: ["Buckets"]
---

# Bucket Owner update

`POST /v2/storage/branch/{branchId}/buckets/{bucketId}/owner`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/branch/{branchId}/buckets/{bucketId}/owner`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/branch/:branchId/buckets/:bucketId/owner/post.ts> (a function with typed inputs; its response is checked against the schema)

Update the bucket owner. Identify the new owner by project admin `id` or `email`; exactly one of them is required.

## Path parameters

- `bucketId` string, required
- `branchId` string, required

## Request body

- union: Exactly one of `id` or `email` must be provided.
  - object
    - `id` integer, nullable, required: Project admin ID of the new owner. Mutually exclusive with `email`.
    - `email` string, email, nullable: Project admin email of the new owner. Mutually exclusive with `id`.
  - object
    - `id` integer, nullable: Project admin ID of the new owner. Mutually exclusive with `email`.
    - `email` string, email, nullable, required: Project admin email of the new owner. Mutually exclusive with `id`.

## Response `204`

Bucket owner updated.

## Other responses

- `400`: Neither or both of `id` and `email` were provided, or the email is invalid.
- `404`: The bucket was not found (`storage.buckets.notFound`) or the specified admin is not a member of the project (`storage.bucket.ownerNotFound`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
