sync

Subscribe Event Webhook

Enroll a connector for real-time change events. For AWS S3, pass your SNS topic's ARN: Captain binds it to this sync and returns the queue_arn of Captain's SQS queue to subscribe the topic to, so events flow AWS-natively with no HTTP endpoint or signature handling on your side. For GCS, R2, Supabase, and Backblaze, send an empty body: Captain mints a webhook secret and returns a private ingest_url to point the store's change notifications at, plus provider-specific setup steps. Pass rotate_secret to revoke a leaked ingest_url and mint a fresh one. Events complement the scheduled reconcile, which remains the reliability backstop. Idempotent per connector.

post/v2/syncs/{sync_id}/webhooks

Path parameters

sync_idstring required

The sync id.

Headers

authorizationstring nullable

Bearer {api_key}. Your Captain API key.

Request body

sns_topic_arnstring nullable

ARN of your SNS topic that S3 event notifications are published to. Bound to the connector so events from this topic resolve here. AWS S3 only.

rotate_secretboolean

Webhook providers (GCS/R2/Supabase/Backblaze) only: mint a FRESH webhook secret, revoking the current ingest_url. Use if the URL may have leaked. The response returns the new ingest_url; the old one stops working immediately. Re-point your provider's webhook at the new URL.

Response

Successful Response

sync_idstring
queue_arnstring nullable

Captain's SQS queue ARN to subscribe your SNS topic to (AWS S3 real-time events). Subscribe your topic to this ARN; Captain consumes it directly (AWS-native, no HTTP endpoint). Null for webhook providers.

topic_arn_boundstring nullable

The SNS topic ARN bound to this connector (echoed back when provided). Null for webhook providers.

ingest_urlstring nullable

Webhook-provider ingest URL (GCS push / R2 / Supabase / Backblaze): point the provider's change notifications at this URL. The URL embeds this connector's secret; keep it private. Null for AWS S3.

secret_setboolean
instructionsstring[]

Provider-native setup steps for wiring real-time change events (S3: SNS -> Captain's SQS queue; webhook providers: pointing notifications at the ingest_url).

Changes

No recorded changes to this endpoint across all 1 revision of this API.