Create Backblaze Sync

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

Path parameters

collection_namestringRequired
Destination collection.

Headers

authorizationstring or nullOptional

Bearer {api_key}. Your Captain API key.

Request

This endpoint expects an object.
bucketstringRequired
Backblaze B2 bucket to keep in sync with the collection.
endpoint_urlstringRequired

Backblaze B2 S3 endpoint, e.g. https://s3.REGION.backblazeb2.com

access_key_idstringRequired

Backblaze B2 Application Key ID (S3 access key ID).

secret_access_keystringRequired

Backblaze B2 Application Key (S3 secret). Stored securely, never returned.

processing_typeenumRequired
Parsing tier.
prefixstringOptionalDefaults to
Key prefix to scope the sync. Empty syncs the whole bucket.
regionstringOptionalDefaults to us-east-1

Region of the bucket (e.g. ‘us-west-004’), matching the endpoint.

include_patternslist of stringsOptional

Glob patterns; only matching keys are synced.

exclude_patternslist of stringsOptional

Glob patterns; matching keys are excluded.

deletion_policyenumOptionalDefaults to mirror

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_metadatamap from strings to anyOptional
Static metadata applied to every synced document.
sync_interval_minutesinteger or nullOptional

Scheduled reconcile cadence (minimum 5; null = manual).

Response

Successful Response
sync_idstringOptional
collection_namestringOptional
bucketstringOptional
prefixstringOptional
regionstringOptional
storage_typeenumOptional

The sync’s cloud storage type. Returned by the list endpoint (GET /v2/syncs) only; other sync endpoints omit this field.

auth_methodenumOptional

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).

account_namestring or nullOptional

Azure Blob syncs only: the storage account name. Null for other providers.

endpoint_urlstring or nullOptional

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_typeenumOptional
include_patternslist of stringsOptional
exclude_patternslist of stringsOptional
deletion_policyenumOptional
statusenumOptional
secret_setbooleanOptional

True once an event-webhook secret has been minted.

sns_subscribe_urlstring or nullOptional

SNS subscribe URL; only surfaced by the subscribe-webhook endpoint.

last_backfill_job_idstring or nullOptional
last_reconcile_atstring or nullOptional
sync_interval_minutesinteger or nullOptional

Effective (already-clamped) cadence; null = manual.

next_sync_atinteger or nullOptional
Epoch ms of the next due scheduled reconcile.
sync_stateenum or nullOptional
last_sync_atinteger or nullOptional
last_sync_errorstring or nullOptional
created_atstringOptional
updated_atstring or nullOptional
© 2026 Captain