---
title: "Create Supabase Sync"
method: POST
path: "/v2/collections/{collection_name}/sync/supabase"
tags: ["sync"]
---

# Create Supabase Sync

`POST /v2/collections/{collection_name}/sync/supabase`

Create a Supabase Storage Sync for a collection and start the initial backfill. Returns the sync; indexing runs asynchronously.

## Path parameters

- `collection_name` string, required

## Headers

- `authorization` string, nullable

## Request body

- SupabaseSyncCreateRequestDocs
  - `bucket` string, required — Supabase Storage bucket to keep in sync with the collection.
  - `prefix` string — Key prefix to scope the sync. Empty syncs the whole bucket.
  - `endpoint_url` string, required — Supabase S3 endpoint, e.g. https://PROJECT_REF.storage.supabase.co/storage/v1/s3
  - `region` string — Region for the S3 protocol.
  - `access_key_id` string, required — Supabase S3 access key ID.
  - `secret_access_key` string, required — Supabase S3 secret access key. Stored securely, never returned.
  - `processing_type` 'advanced' | 'basic', required — Parsing tier.
  - `include_patterns` string[] — Glob patterns; only matching keys are synced.
  - `exclude_patterns` string[] — Glob patterns; matching keys are excluded.
  - `deletion_policy` 'mirror' | 'archive' | 'ignore' — How to propagate objects removed from the source: `mirror` removes them from the collection so they no longer appear in search; `archive` keeps the document's content but marks it archived, excluded from search by default and surfaced with `include_archived: true`; `ignore` leaves the indexed copy in place.
  - `custom_metadata` object — Static metadata applied to every synced document.
  - `sync_interval_minutes` integer, nullable — Scheduled reconcile cadence (minimum 5; null = manual).

## Response `201`

Successful Response

- S3SyncConnectorResponseDocs
  - `sync_id` string
  - `collection_name` string
  - `bucket` string
  - `prefix` string
  - `region` string
  - `storage_type` 's3' | 'gcs' | 'r2' | 'supabase' | 'backblaze' — The sync's cloud storage type. Returned by the list endpoint (GET /v2/syncs) only; other sync endpoints omit this field.
  - `auth_method` 'iam_role' | 'access_key' | 'service_account' — How the sync authenticates to the bucket: 'iam_role' (AWS cross-account assume-role), 'access_key' (S3-compatible key pair), or 'service_account' (GCS service-account JSON).
  - `endpoint_url` string, nullable — S3-compatible endpoint URL (access-key syncs on non-AWS providers); null for AWS S3. Returned by the list endpoint (GET /v2/syncs) only; other sync endpoints omit this field.
  - `processing_type` 'advanced' | 'basic'
  - `include_patterns` string[]
  - `exclude_patterns` string[]
  - `deletion_policy` 'mirror' | 'archive' | 'ignore'
  - `status` 'active' | 'paused' | 'inactive'
  - `secret_set` boolean — True once an event-webhook secret has been minted.
  - `sns_subscribe_url` string, nullable — SNS subscribe URL; only surfaced by the subscribe-webhook endpoint.
  - `last_backfill_job_id` string, nullable
  - `last_reconcile_at` string, nullable
  - `sync_interval_minutes` integer, nullable — Effective (already-clamped) cadence; null = manual.
  - `next_sync_at` integer, nullable — Epoch ms of the next due scheduled reconcile.
  - `sync_state` 'idle' | 'running' | 'error'
  - `last_sync_at` integer, nullable
  - `last_sync_error` string, nullable
  - `created_at` string
  - `updated_at` string, nullable

---

[API](https://skmtc.dev/runcaptain/apis/api-reference.md) · [All operations](https://skmtc.dev/runcaptain/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runcaptain/api-reference/revisions/fe4649e3f4aa/schema)
