Create R2 Sync
Create a Cloudflare R2 Sync for a collection and start the initial backfill. The endpoint is derived from account_id and jurisdiction. Returns the sync; indexing runs asynchronously.
Path parameters
Headers
Request
Cloudflare account ID (from the R2 dashboard URL). Determines the endpoint.
R2 jurisdiction; selects the endpoint.
Glob patterns; only matching keys are synced.
Glob patterns; matching keys are excluded.
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.
Scheduled reconcile cadence (minimum 5; null = manual).
Response
The sync’s cloud storage type. Returned by the list endpoint (GET /v2/syncs) only; other sync endpoints omit this field.
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).
Azure Blob syncs only: the storage account name. Null for other providers.
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.
True once an event-webhook secret has been minted.
SNS subscribe URL; only surfaced by the subscribe-webhook endpoint.
Effective (already-clamped) cadence; null = manual.