---
title: "Scheduled sync finished"
method: POST
path: "organization.synced"
tags: ["Webhook Events"]
---

# Scheduled sync finished

`POST organization.synced` (webhook)

One of your workspace's scheduled syncs finished: every account and video it refreshed is live in the dashboard and the API, or failed. One event per sync slot that had something to refresh, also when some or all of its items failed (`status`). A slot that has not finished 2 hours after its last progress, or 6 hours after its syncs were sent (normally seconds after `scheduledFor`), is reported as it stands (`timedOut`, `unfinished`). Syncs you start yourself are reported by `sync.completed`. Opt-in: endpoints subscribed to all events (`*`) do not receive it; subscribe to it by name.

## Headers

- `webhook-id` string, required
- `webhook-timestamp` string, required
- `webhook-signature` string, required

## Payload

- OrganizationSyncedWebhookEvent: One of your workspace's scheduled syncs finished: every account and video it refreshed is live in the dashboard and the API, or failed. One event per sync slot that had something to refresh, also when some or all of its items failed (`status`). A slot that has not finished 2 hours after its last progress, or 6 hours after its syncs were sent (normally seconds after `scheduledFor`), is reported as it stands (`timedOut`, `unfinished`). Syncs you start yourself are reported by `sync.completed`. Opt-in: endpoints subscribed to all events (`*`) do not receive it; subscribe to it by name.
  - `id` string, required: Event id; the `webhook-id` header. The same on every retry: dedupe on it.
  - `type` 'organization.synced', required
  - `timestamp` string, date-time, required: When the change happened
  - `organizationId` string, required
  - `actor` WebhookActor, required: Who caused the event: a member (`user`), an API key (`apiKeyId`), a creator, or viral.app itself (`system`); `surface` says where the change entered. Skip events your own API key caused to avoid loops.
    - `type` 'user' | 'api_key' | 'creator' | 'system', required
    - `surface` 'ui' | 'api' | 'copilot' | 'system', required
    - `userId` string, nullable, required
    - `apiKeyId` string, nullable, required
    - `impersonated` boolean, required
  - `data` object, required
    - `sync` object, required
      - `id` string, required
      - `trigger` 'scheduled', required
      - `scheduledFor` string, date-time, required
      - `status` 'succeeded' | 'partial' | 'failed', required
      - `finishedAt` string, date-time, required
      - `durationSeconds` number, required
      - `timedOut` boolean, required
      - `counts` object, required
        - `total` integer, required
        - `synced` integer, required
        - `failed` integer, required
        - `unfinished` integer, required
      - `accounts` object, required
        - `total` integer, required
        - `synced` integer, required
        - `failed` integer, required
        - `unfinished` integer, required
      - `videos` object, required
        - `total` integer, required
        - `synced` integer, required
        - `failed` integer, required
        - `unfinished` integer, required
      - `result` object, required
        - `videosSynced` integer, required
      - `platforms` string[], required

## Acknowledgement `200`

Any 2xx within 15 seconds acknowledges the event. Anything else, a timeout or a redirect is retried (10 attempts over about 3 days); 410 disables the endpoint.

---

[API](https://skmtc.dev/viral/apis/viral-app-api.md) · [All operations](https://skmtc.dev/viral/apis/viral-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/viral/apis/viral-app-api/revisions/31e97fa79ef1?raw)
