---
title: "Create Campaign"
method: POST
path: "/v1/campaigns"
tags: ["LiveOps"]
---

# Create Campaign

`POST /v1/campaigns`

## Request body

- CampaignCreate
  - `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'
    - 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
  - `graph` GraphRoot
    - `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
  - `version_description` string

## Response `201`

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'
    - 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-08-27** `102d483c8b81` — 2 info
  - added `RequirePennyDropNode` discriminator mapping keys to the `graph/nodes/additionalProperties/` request property
  - added `#/components/schemas/RequirePennyDropNode` to the `graph/nodes/additionalProperties/` request property `oneOf` list
- **2026-08-20** `8662e77bc1e2` — 2 info
  - added `BanUserNode, BatchBanUserNode, DeclinePaymentNode, Require3DSNode` discriminator mapping keys to the `graph/nodes/additionalProperties/` request property
  - added `#/components/schemas/BanUserNode, #/components/schemas/BatchBanUserNode, #/components/schemas/Require3DSNode, #/components/schemas/DeclinePaymentNode` to the `graph/nodes/additionalProperties/` request property `oneOf` list
- **2026-08-12** `a14f6ce6d187` — 83 warning, 2 info
  - the `attributes/custom_attributes/items/profile_display/card_template_id` request property's maxLength was set to `32`
  - the `attributes/run_for_subscription_id` request property's maxLength was set to `32`
  - the `graph/nodes/additionalProperties/oneOf[subschema #11: CreateItemBannerActionNode]/config/featured_item_id` request property's maxLength was set to `32`
  - the `graph/nodes/additionalProperties/oneOf[subschema #11: CreateItemBannerActionNode]/config/store_id` request property's maxLength was set to `32`
  - …81 more
- …earlier changes not shown

[Full history](https://skmtc.dev/aghanim/apis/aghanim-server-to-server-api/changes/v1/campaigns/post.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/d8b885323f9e/schema)
