Skip to content
gist.link ↗

adAccounts

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

Ad accounts discovered under one connection. Any authenticated org member.

marketing:query:adAccounts

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

type Query {
adAccounts(connectionId: ID!): [AdAccount!]!
}
Argument Type Required Description
connectionId ID! Yes —

[AdAccount!]! — 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": "query AdAccounts($connectionId: ID!) { adAccounts(connectionId: $connectionId) { id name currency } }",
"variables": {
"connectionId": "01a01234-abcd-7000-9000-0123456789ab"
}
}
JSON