Code Storage now delivers webhook notifications for the full repository sync lifecycle.
When a sync run starts, succeeds, or fails, Code Storage publishes an event and delivers it to any active webhook subscription that matches the event type. This gives you real-time visibility into sync operations without polling.
Three new event types are available:
repo.sync.started— fired when a sync run begins, before the upstream fetch executes.repo.sync.succeeded— fired when a sync run completes successfully.repo.sync.failed— fired when a sync run fails, including authentication errors, clone failures, and upstream connectivity issues.
Create a webhook subscription that includes one or more of the new event types:
curl -X POST https://code.storage/api/v1/webhooks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks",
"events": ["repo.sync.started", "repo.sync.succeeded", "repo.sync.failed"]
}'Each sync event includes the repository, run metadata, and timing information:
{
"type": "repo.sync.succeeded",
"repository": {
"id": "repo_abc123",
"url": "https://git.example.com/org/repo"
},
"run_count": 3,
"is_first_sync": false,
"started_at": "2026-03-31T10:00:00Z",
"completed_at": "2026-03-31T10:02:30Z"
}Failed events include an error field with a concise description:
{
"type": "repo.sync.failed",
"repository": {
"id": "repo_abc123",
"url": "https://git.example.com/org/repo"
},
"run_count": 3,
"is_first_sync": false,
"started_at": "2026-03-31T10:00:00Z",
"completed_at": "2026-03-31T10:02:30Z",
"error": "authentication failed"
}The is_first_sync field is true when the repository has never successfully synced before, making
it straightforward to detect initial sync completion without tracking run counts yourself.
Sync webhooks use the same HMAC-SHA256 signature verification and retry behavior as existing push webhooks.