Skip to content

Resync with Meta

POST /api/marketing/ad-accounts/{id}/refresh

Rereads the account’s name, currency and status from the Graph API and updates last_synced_at. Requires the marketing:manage scope.

StatusDescriptionSchema
200—AdAccountDto
Terminal window
curl -X POST https://api.neike.dev/api/marketing/ad-accounts/{id}/refresh \
-H "x-neike-api-key: whk_live_…"
FieldTypeDescription
idstringrequiredAccount id in Neike (uuid).
providermetarequiredAds provider of the account. Today there is only one: meta.
ad_account_idstringrequiredAccount id in Meta, with prefix. Example: "act_123456789".
account_idstringrequiredThe same id without the act_ prefix. Example: "123456789".
namestringrequiredExample: "Cuenta principal".
currencystringrequiredAccount currency in Meta. Example: "ARS".
timezone_namestringrequiredExample: "America/Argentina/Buenos_Aires".
account_statusnumberrequiredMeta numeric enum (1 = active, 2 = disabled…). Example: 1.
account_status_labelstringrequiredThe same status as text, already translated. Example: "active".
business_idstringoptional—
business_namestringoptional—
statusavailable · active · disabled · revokedrequiredStatus in Neike: available (connected, not yet chosen), active (operable), disabled (paused by the client) or revoked (Meta invalidated the token).
last_synced_atstring (date-time)required—
created_atstring (date-time)required—