---
title: "Trigger an async sync"
method: POST
path: "/analytics/sync"
tags: ["Analytics"]
---

# Trigger an async sync

`POST /analytics/sync`

## Request

- Base URL: `https://api.shortsync.app/v1`
- URL: `https://api.shortsync.app/v1/analytics/sync`
- Auth: HTTP bearer

Kicks off a fresh sync from every connected platform (or one, if
`platform` is set). Returns `202 Accepted` immediately with a
`job_id`; the actual multi-minute work runs in a background
worker. Poll `data.status_url` until the job reports
`completed`.

Only one queued/running sync per workspace at a time. Repeat
requests while a job is in flight return `409 SYNC_IN_PROGRESS`
with the existing `job_id` in `details` so clients can attach to
it instead of retrying.

Idempotency-safe: replay the same `Idempotency-Key` within the
retention window and the original 202 payload is returned instead
of enqueueing a duplicate.

## Headers

- `Idempotency-Key` string

## Request body

- AnalyticsSyncCreate: Optional body for `POST /analytics/sync`. Send `{}` to sync every supported connected platform.
  - `platform` 'instagram' | 'tiktok' | 'youtube' | 'facebook' | 'snapchat' | 'pinterest' | 'threads' | 'twitter' | 'bluesky' | 'linkedin' | 'reddit' | 'telegram' | 'mastodon' | 'discord' | 'tumblr' | 'pixelfed' | 'google_business'

## Response `202`

Sync job enqueued.

- object
  - `data` AnalyticsSyncJobAccepted, required
    - `job_id` string, uuid, required
    - `status` 'queued', required: Always `queued` on the 202 response; poll `status_url` for later transitions.
    - `status_url` string, uri, required: Absolute URL of `GET /analytics/sync/{job_id}` for polling.
    - `estimated_seconds` integer, required: Rough upper bound on how long the sync may take. Real durations range from ~15s to ~5 min.
    - `requested_at` string, date-time, required

## Other responses

- `400`: Request body or parameters failed validation.
- `401`: Missing, malformed, or revoked token.
- `403`: Token is valid but cannot access this resource. Common cases: - `INSUFFICIENT_SCOPE` - token lacks the required scope. - `WORKSPACE_NOT_ALLOWED` - account token is allowlisted to other workspaces.
- `409`: Another sync is already in flight for this workspace. `details` carries the existing `job_id` and `status_url`.
- `429`: Per-key sliding-window rate limit (60 req/min), per-org monthly request quota, or per-user upload cap was hit. `RATE_LIMIT_EXCEEDED` carries the window headers; `QUOTA_EXCEEDED` carries `details.quota` (which counter), `used`, `limit`, `resets_at`, and `upgrade_url`. `UPLOAD_QUOTA_EXCEEDED` (Free tier on `POST /posts` only) carries the same shape plus `details.remaining`.

---

[API](https://skmtc.dev/shortsync/apis/shortsync-api.md) · [All operations](https://skmtc.dev/shortsync/apis/shortsync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shortsync/apis/shortsync-api/revisions/71fdaef1e400?raw)
