---
title: "Update storage bucket"
method: POST
path: "/api/organizations/{organizationId}/buckets/{bucketId}"
tags: ["OrganizationData"]
---

# Update storage bucket

`POST /api/organizations/{organizationId}/buckets/{bucketId}`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/buckets/{bucketId}`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/organizations/:organizationId/buckets/:bucketId/post.ts> (a function with typed inputs; its response is checked against the schema)

Updates storage bucket details. This only updates fields that were set in the request body.
Before updating the bucket details, it is required to verify the connection using the
POST /api/organizations/{organizationId}/buckets/verify endpoint.

The verification process:
1. Call the verify endpoint with the new bucket details.
2. Poll the verify endpoint until it responds with `connectionStatus: connected`.
3. If the endpoint responds with `connectionStatus: error`, the verification has failed.

Only proceed with updating the bucket details after receiving a `connected` status.
The polling interval and timeout should be determined based on your application's requirements.

## Path parameters

- `organizationId` integer, required
- `bucketId` integer, required

## Request body

- UpdateOrganizationBucketRequest
  - `accessKey` string: S3 access key
  - `secretKey` string: S3 secret key
  - `endpoint` string: S3 endpoint
  - `bucket` string: S3 bucket
  - `region` string: S3 region
  - `checkConnectivityPrefix` string: Set this if you don't have access to the root of this bucket. Only used to verify connectivity to this bucket.
  - `storageAccountName` string: The name of the storage account for Azure Blob Storage

## Response `200`

OK

- GenericApiResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
