Skip to content
gist.link ↗

syncInsights

Mutation Marketing API — POST https://marketing.api.gist.link/graphql

Enqueue an insights sync for a connection (optionally scoped to one ad account). ROLE_ADMIN or ROLE_MARKETING_MANAGER.

marketing:mutation:syncInsights

The calling IAM key must hold this permission (or a wildcard that covers it: marketing:mutation:* or marketing:*) and the access token must have been minted with audience=marketing. See Permissions.

type Mutation {
syncInsights(connectionId: ID, accountId: ID): SyncJob!
}
Argument Type Required Description
connectionId ID No —
accountId ID No —

SyncJob! — see the Marketing types reference.

Terminal window
curl https://marketing.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation SyncInsights($connectionId: ID, $accountId: ID) { syncInsights(connectionId: $connectionId, accountId: $accountId) { id kind status } }",
"variables": {
"connectionId": "01a01234-abcd-7000-9000-0123456789ab",
"accountId": "01a01234-abcd-7000-9000-0123456789ab"
}
}
JSON