Skip to content
gist.link ↗

updateCampaign

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

Update a campaign’s local fields. ROLE_ADMIN or ROLE_MARKETING_MANAGER.

marketing:mutation:updateCampaign

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 {
updateCampaign(id: ID!, input: UpdateCampaignInput!): Campaign!
}
Argument Type Required Description
id ID! Yes —
input UpdateCampaignInput! 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 UpdateCampaign($id: ID!, $input: UpdateCampaignInput!) { updateCampaign(id: $id, input: $input) { id name status currency } }",
"variables": {
"id": "01a01234-abcd-7000-9000-0123456789ab",
"input": {
"name": "Example",
"objective": "example",
"dailyBudget": 10
}
}
}
JSON