Skip to content
gist.link ↗

createCampaign

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

Create a normalized campaign locally (not yet pushed to the platform). ROLE_ADMIN or ROLE_MARKETING_MANAGER.

marketing:mutation:createCampaign

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 {
createCampaign(input: CreateCampaignInput!): Campaign!
}
Argument Type Required Description
input CreateCampaignInput! Yes —

Campaign! — 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 CreateCampaign($input: CreateCampaignInput!) { createCampaign(input: $input) { id name status currency } }",
"variables": {
"input": {
"adAccountId": "01a01234-abcd-7000-9000-0123456789ab",
"platform": "META",
"name": "Example",
"objective": "example",
"dailyBudget": 10,
"currency": "example"
}
}
}
JSON