> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Update a storage integration

PATCH https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/{storageIntegrationId}
Content-Type: application/json

Update a storage integration configured for an organization. This endpoint replaces the identity details for the integration. 
### Usage notes
- To perform this operation, you must use API credentials owned by a user assigned the Admin account type.
- To read or update storage integrations for a tenant organization, use [impersonation](/docs/impersonate-users) to obtain a token for that tenant, then call this endpoint with that token.

Reference: https://help.sigmacomputing.com/reference/update-storage-integration

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sigmacomputing.com` (Server for GCP (US) hosted organizations, default)
- `https://api.sa.gcp.sigmacomputing.com` (Server for GCP (KSA) hosted organizations)
- `https://aws-api.sigmacomputing.com` (Server for AWS US (West) hosted organizations)
- `https://api.us-a.aws.sigmacomputing.com` (Server for AWS US (East) hosted organizations)
- `https://api.ca.aws.sigmacomputing.com` (Server for AWS Canada hosted organizations)
- `https://api.eu.aws.sigmacomputing.com` (Server for AWS Europe hosted organizations)
- `https://api.au.aws.sigmacomputing.com` (Server for AWS Australia and APAC hosted organizations)
- `https://api.uk.aws.sigmacomputing.com` (Server for AWS UK hosted organizations)
- `https://api.us.azure.sigmacomputing.com` (Server for Azure US hosted organizations)
- `https://api.eu.azure.sigmacomputing.com` (Server for Azure Europe hosted organizations)
- `https://api.ca.azure.sigmacomputing.com` (Server for Azure Canada hosted organizations)
- `https://api.uk.azure.sigmacomputing.com` (Server for Azure United Kingdom hosted organizations)
- `https://api.au.azure.sigmacomputing.com` (Server for Azure Australia hosted organizations)

## Request

### Path parameters

- `storageIntegrationId` (string, required) — Unique identifier of the storage integration.

### Body (application/json)

This endpoint expects an organizations_updateStorageIntegration_Request.

- `organizations_updateStorageIntegration_Request`

## Response

### 200

The response body.

- `provider` (enum, required) — Cloud storage provider for the storage integration.
  - Allowed values: `s3`, `gcs`, `azure`
- `storageIntegrationId` (string, required) — Unique identifier of the storage integration.
- `allowedLocation` (string, required) — Cloud storage URI Sigma writes to for the storage integration.
- `name` (string, optional) — Display name of the storage integration.
- `kmsKeyName` (string, optional) — KMS key Sigma uses to encrypt objects written to the bucket. Relevant only when `provider` is `s3`.
- `storageAwsRoleArn` (string, optional) — AWS IAM role ARN Sigma assumes to access the bucket. Relevant only when `provider` is `s3`.
- `externalId` (string, optional) — External ID Sigma includes in the AWS role trust policy request. Relevant only when `provider` is `s3`.
- `tenantId` (string, optional) — Azure AD tenant ID that owns the storage account. Relevant only when `provider` is `azure`.

## Types

### OrganizationsUpdateStorageIntegrationRequest0

AWS S3 storage integration.

- `provider` (enum, required) — Cloud storage provider to store data in an AWS S3 bucket.
  - Allowed values: `s3`
- `bucketName` (string, required) — Name of the S3 bucket.
- `pathPrefix` (string, required) — Folder path prefix within the bucket.
- `storageAwsRoleArn` (string, required) — AWS IAM role ARN Sigma assumes to access the bucket.
- `name` (string, optional) — Display name of the storage integration.
- `kmsKeyName` (string, optional) — KMS key Sigma uses to encrypt objects written to the bucket. Relevant only when `provider` is `s3`.

### OrganizationsUpdateStorageIntegrationRequest1

Google Cloud Storage storage integration.

- `provider` (enum, required) — Cloud storage provider to store data in a Google Cloud Storage bucket.
  - Allowed values: `gcs`
- `bucketName` (string, required) — Name of the GCS bucket.
- `pathPrefix` (string, required) — Folder path prefix within the bucket.
- `gcpServiceAccount` (string, required) — GCP service account email Sigma impersonates to access the bucket.
- `warehouseStorageIntegrationName` (string, optional) — Name of the warehouse-side storage integration used for Snowflake or Databricks connections.
- `name` (string, optional) — Display name of the storage integration.

### OrganizationsUpdateStorageIntegrationRequest2

Azure Blob Storage storage integration.

- `provider` (enum, required) — Cloud storage provider to store data in an Azure Blob Storage container.
  - Allowed values: `azure`
- `bucketName` (string, required) — Name of the target storage container.
- `pathPrefix` (string, required) — Folder path prefix within the container.
- `storageAccount` (string, required) — Azure storage account name.
- `tenantId` (string, required) — Azure AD tenant ID that owns the storage account.
- `name` (string, optional) — Display name of the storage integration.

## Examples

**Request**

```json
{
  "bucketName": "string",
  "pathPrefix": "string",
  "provider": "s3",
  "storageAwsRoleArn": "string"
}
```

**Response**

```json
{
  "provider": "s3",
  "storageIntegrationId": "string",
  "allowedLocation": "string",
  "name": "string",
  "kmsKeyName": "string",
  "storageAwsRoleArn": "string",
  "externalId": "string",
  "tenantId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId"

payload = {
    "bucketName": "string",
    "pathPrefix": "string",
    "provider": "s3",
    "storageAwsRoleArn": "string"
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId';
const options = {
  method: 'PATCH',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"bucketName":"string","pathPrefix":"string","provider":"s3","storageAwsRoleArn":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId"

	payload := strings.NewReader("{\n  \"bucketName\": \"string\",\n  \"pathPrefix\": \"string\",\n  \"provider\": \"s3\",\n  \"storageAwsRoleArn\": \"string\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"bucketName\": \"string\",\n  \"pathPrefix\": \"string\",\n  \"provider\": \"s3\",\n  \"storageAwsRoleArn\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"bucketName\": \"string\",\n  \"pathPrefix\": \"string\",\n  \"provider\": \"s3\",\n  \"storageAwsRoleArn\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId', [
  'body' => '{
  "bucketName": "string",
  "pathPrefix": "string",
  "provider": "s3",
  "storageAwsRoleArn": "string"
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"bucketName\": \"string\",\n  \"pathPrefix\": \"string\",\n  \"provider\": \"s3\",\n  \"storageAwsRoleArn\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "bucketName": "string",
  "pathPrefix": "string",
  "provider": "s3",
  "storageAwsRoleArn": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/organizations/settings/storageIntegrations/storageIntegrationId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```