---
title: "Connect a storage bucket"
method: POST
path: "/storage"
tags: ["Storage"]
---

# Connect a storage bucket

`POST /storage`

Connect your own bucket under an id you choose. The credentials are verified with a write, read and delete probe before anything is stored, encrypted at rest, and never returned. For R2, a Cloudflare API token may stand in for the keys: it is exchanged for the key pair it represents and not kept.

## Request body

- union
  - object
    - `provider` 'r2', required
    - `accountId` string
    - `jurisdiction` 'eu' | 'fedramp' | 'us'
    - `credentials` union, required
      - object
        - `type` 'keys', required
        - `accessKeyId` string, required
        - `secretAccessKey` string, required
      - object
        - `type` 'cloudflare-token', required
        - `token` string, required
    - `id` string, required
    - `bucket` string, required
    - `publicBaseUrl` string, uri
    - `createBucket` boolean
  - object
    - `provider` 'supabase', required
    - `projectRef` string
    - `endpoint` string, uri
    - `region` string, required
    - `credentials` union, required
      - object
        - `type` 'keys', required
        - `accessKeyId` string, required
        - `secretAccessKey` string, required
      - object
        - `type` 'supabase-session', required
        - `anonKey` string, required
        - `sessionToken` string, required
    - `id` string, required
    - `bucket` string, required
    - `publicBaseUrl` string, uri
    - `createBucket` boolean
  - object
    - `provider` 's3', required
    - `region` string
    - `credentials` union, required
      - object
        - `type` 'keys', required
        - `accessKeyId` string, required
        - `secretAccessKey` string, required
      - object
        - `type` 'aws-role', required
        - `roleArn` string, required
    - `id` string, required
    - `bucket` string, required
    - `publicBaseUrl` string, uri
    - `createBucket` boolean
  - object
    - `provider` 's3-compatible', required
    - `endpoint` string, uri, required
    - `region` string, required
    - `pathStyle` boolean
    - `credentials` object, required
      - `type` 'keys', required
      - `accessKeyId` string, required
      - `secretAccessKey` string, required
    - `id` string, required
    - `bucket` string, required
    - `publicBaseUrl` string, uri
    - `createBucket` boolean

## Response `201`

Connected

- object
  - `data` object, required
    - `bucket` string, required
    - `publicBaseUrl` string, uri
    - `endpoint` string, uri, required
    - `region` string, required
    - `pathStyle` boolean, required
    - `accountId` string
    - `jurisdiction` 'eu' | 'fedramp' | 'us'
    - `projectRef` string
    - `expiresOn` number
    - `pending` true
    - `auth` 'role'
    - `access` 'read'
    - `problem` object
      - `at` number, required
      - `message` string, required
    - `pathTemplate` string
    - `onConflict` 'suffix' | 'replace'
    - `defaultDestination` true
    - `conditionalWrites` boolean
    - `id` string, required
    - `provider` string, required
    - `createdAt` number, required
    - `updatedAt` number, required
    - `deliverySummary` object
      - `jobsLast30d` integer, required
      - `bytesLast30d` integer, required
      - `lastAt` number, nullable, required
      - `lastStatus` 'delivered' | 'failed' | 'null', nullable, required
      - `lastReason` 'destination_denied' | 'signature_mismatch' | 'bucket_not_found' | 'object_too_large' | 'already_exists' | 'destination_unavailable' | 'not_deliverable' | 'null', nullable, required
    - `checks` object[]
      - `name` 'write' | 'read' | 'delete' | 'list', required
      - `status` 'passed' | 'failed' | 'skipped', required
      - `reason` 'destination_denied' | 'signature_mismatch' | 'bucket_not_found' | 'object_too_large' | 'already_exists' | 'destination_unavailable' | 'not_deliverable'
      - `message` string

## Other responses

- `400` — Invalid body, or the write probe failed
- `401` — Unauthorized
- `403` — Missing scope or role
- `409` — An id already exists

## Changes

- **2026-09-13** `e2df91eff7a2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rendobar/apis/rendobar-api/changes/storage/post.md)

---

[API](https://skmtc.dev/rendobar/apis/rendobar-api.md) · [All operations](https://skmtc.dev/rendobar/apis/rendobar-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rendobar/apis/rendobar-api/revisions/14f92fdd491f?raw)
