---
title: "Update Campaign Graph"
method: PUT
path: "/v1/campaigns/{campaign_id}/graph"
tags: ["LiveOps"]
---

# Update Campaign Graph

`PUT /v1/campaigns/{campaign_id}/graph`

## Path parameters

- `campaign_id` string, required

## Request body

- CampaignGraph
  - `id` string, required
  - `next_node_id` string
  - `title` string
  - `x` integer, required
  - `y` integer, required
  - `result` string
  - `model_type` string
  - `break_on_error` boolean
  - `description` string
  - `nodes` object
  - `view_port` ViewPort
    - `x` number, required
    - `y` number, required
    - `zoom` number, required

## Response `200`

Successful Response

- Campaign
  - `name` string, required
  - `description` string
  - `enabled` boolean, required
  - `type` union, required
    - 'game_hub_visit' | 'game_hub_visit_store' | 'game_hub_first_login' | 'game_hub_login' | 'add_segment' | 'coupon_redeemed' | 'registered_in_game' | 'game_login' | 'purchased_in_game' | 'purchased_in_web' | 'abandoned_cart' | 'level_up' | 'custom_event' | 'free_item_claimed' | 'daily_reward_claimed' | 'loyalty_reward_claimed' | 'progression_reward_claimed' | 'payment_insufficient_funds' | 'subscription_status_updated' | 'subscription_schedule' | 'pwa_installed' | 'pwa_deinstalled' | 'pwa_open' | 'email_submitted'
    - string
  - `time_limit` boolean
  - `start_at` number
  - `end_at` number
  - `archived_at` number
  - `attributes` PersistentCampaignAttributes
    - `custom_attributes` CustomAttribute[]
      - `name` string, required
      - `description` string
      - `type` 'number' | 'date' | 'string' | 'boolean' | 'list', required
      - `min` integer
      - `max` integer
      - `custom_values` string[]
      - `can_use_in_deep_link` boolean
      - `scope` 'public' | 'private'
      - `profile_display` ProfileDisplay — How a player custom attribute is presented on the hub profile.
        - `display_name` string, nullable
        - `value_format` 'string' | 'number' | 'currency' — How the hub renders a profile attribute value, or each element of a list value.
        - `icon_url` string, uri, nullable
        - `background_image_url` string, uri, nullable
        - `card_template_id` string, nullable — Card template rendering this attribute on the hub
      - `is_hub_url_param` boolean
    - `abandoned_cart_duration` integer
    - `visit_duration` integer
    - `page_slugs` string[]
    - `variables` MathExpression[]
      - `tokens` Token[]
        - `type` 'attribute' | 'custom_attribute' | 'event_attribute' | 'custom_event_attribute' | 'operator' | 'number' | 'date' | 'string' | 'boolean' | 'list' | 'variable' | 'virtual_currency', required
        - `value` unknown
      - `name` string, required
    - `run_for_subscription_id` string
  - `position` integer
  - `allowed_popups_on_store` boolean
  - `is_sync` boolean
  - `id` string, required
  - `version` string
  - `created_by_customer_id` string
  - `created_from_id` string
  - `version_description` string, required
  - `modified_at` integer
  - `created_at` integer, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-04** `2fecf8a6aa0b` — 1 warning, 2 info
  - added the new `email_submitted` enum value to the `type/anyOf[subschema #1: CampaignEventType]/` response property for the response status `200`
  - added `EmailPromptActionNode, GrantPointsNode, GrantVirtualCurrencyNode, WebpushPromptActionNode` discriminator mapping keys to the `nodes/additionalProperties/` request property
  - added `#/components/schemas/EmailPromptActionNode, #/components/schemas/GrantPointsNode, #/components/schemas/GrantVirtualCurrencyNode, #/components/schemas/WebpushPromptActionNode` to the `nodes/additionalProperties/` request property `oneOf` list
- **2026-08-31** `b06feb9e1630` — 1 breaking, 1 info
  - removed `#/components/schemas/AddStoreNode, #/components/schemas/SortStoreItemsNode, #/components/schemas/ItemCategorySortNode, #/components/schemas/AddPageBlockNode, #/components/schemas/BanUserNode, #/components/schemas/BatchBanUserNode, #/components/schemas/Require3DSNode, #/components/schemas/DeclinePaymentNode, #/components/schemas/RequirePennyDropNode` from the `nodes/additionalProperties/` request property `oneOf` list
  - removed `AddPageBlockNode, AddStoreNode, BanUserNode, BatchBanUserNode, DeclinePaymentNode, ItemCategorySortNode, Require3DSNode, RequirePennyDropNode, SortStoreItemsNode` discriminator mapping keys from the `nodes/additionalProperties/` request property
- …earlier changes not shown

[Full history](https://skmtc.dev/aghanim/apis/aghanim-server-to-server-api/changes/v1/campaigns/:campaign_id/graph/put.md)

---

[API](https://skmtc.dev/aghanim/apis/aghanim-server-to-server-api.md) · [All operations](https://skmtc.dev/aghanim/apis/aghanim-server-to-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aghanim/aghanim-server-to-server-api/revisions/2fecf8a6aa0b/schema)
