sync

Trigger a sync

Pushes the active Space's campaigns to the connected ad platforms (Google Ads, Microsoft Advertising, Reddit Ads, Meta Ads, ChatGPT Ads and LinkedIn Ads) and imports changes made on the platforms. This is the only operation that makes campaigns live, and it can start real spend.

The sync runs in the background: the response arrives immediately with a syncId and status: started, or status: nothing_to_sync. Poll Get a sync until it finishes.

Recommended flow: call Preview a sync plan first, review it, then pass its planHash here so the sync executes exactly what you reviewed. Scope it with campaignIds, choose directions per platform with platformModes, and use force to re-export unchanged campaigns.

The platform connection belongs to the account; the campaigns synced are the active Space's.

Errors

  • 409 SYNC_ALREADY_ACTIVE: a sync is already running in this Space; details carries activeSyncId and startedAt.
  • 409 SYNC_SCOPE_EXCEEDED: the plan would touch campaigns outside campaignIds; set confirmFullSpace to allow it.
  • 409 SYNC_PLAN_DRIFT: the plan changed since the planHash you passed was computed; preview again.
  • 400 INVALID_PLATFORM_MODES: platformModes names an unknown platform or direction.
post/api/v1/sync

Request

  • Base URL: https://api.growomat.com
  • URL: https://api.growomat.com/api/v1/sync
  • Auth: HTTP bearer

Headers

X-Space-Idstring

The Space to work in, for example spc_8f3aK2. Omit it to use your personal Space. List your Spaces returns the ids. A Space that does not exist returns 404 SPACE_NOT_FOUND; one you are not a member of returns 403 NOT_A_MEMBER.

Request body

platformsstring[]

Platform ids to sync, for example ["google-ads"]. Defaults to every connected platform.

campaignIdsstring[]

Sync only these campaigns, on every platform and in every phase (import, export, remove). The scope is never widened silently: a plan that would touch a campaign outside this list is refused with 409 SYNC_SCOPE_EXCEEDED unless confirmFullSpace is set. Omit to sync the whole Space.

forceboolean

Re-export the in-scope campaigns even when nothing changed, including targeting, extensions and labels. To recreate a campaign that was deleted on the platform, use Unlink campaigns from a platform and then sync.

confirmFullSpaceboolean

Acknowledge a large change. Required when an unscoped sync would change more than 10 campaigns, and to override a SYNC_SCOPE_EXCEEDED refusal.

planHashstring

Run exactly the plan you previewed: pass the planHash from Preview a sync plan. If the plan has changed since, the sync is refused with 409 SYNC_PLAN_DRIFT instead of running something you did not review.

platformModesobject

Per-platform direction: map a platform id to the phases it may run. A platform absent from the map runs all three. Combines with campaignIds (which campaigns) and planHash (the hash covers the full previewed plan; holding a direction back is a choice, not drift). Work held back is reported in the response under scope.excludedByMode. Example, to keep importing from a platform while holding its exports: {"google-ads": ["import", "remove"]}. Unknown platform ids or directions fail with 400 INVALID_PLATFORM_MODES.

Response

OK. The result is in data. List responses also carry meta with nextCursor and total.

dataunknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.