---
title: "Upsert external storage"
method: PUT
path: "/imports/v2/external-storage"
tags: ["product:chat"]
---

# Upsert external storage

`PUT /imports/v2/external-storage`

Creates or updates the external storage configuration for the app. Supports AWS S3 (via cross-account IAM role assumption) and GCS (via service-account JSON credentials).

## Request body

- UpsertExternalStorageRequest, nullable
  - `aws_s3` UpsertExternalStorageAWSS3Request
    - `bucket` string, required
    - `path_prefix` string
    - `region` string, required
    - `role_arn` string, required
  - `gcs` UpsertExternalStorageGCSRequest
    - `bucket` string, required
    - `credentials` string, required
    - `path_prefix` string
  - `type` 'aws_s3' | 'gcs', required

## Response `201`

Response

- UpsertExternalStorageResponse, nullable — Basic response information
  - `duration` string, required — Duration of the request in milliseconds

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/3dba86aaa0d8/schema)
