Campaigns V2

Create Campaign

Creates a new campaign. placements and audiences are both optional — omit them (or send empty arrays) to create a campaign with just a name, as in the legacy dashboard, and configure it later; when no audiences are supplied the server creates a single default control audience (a 0% holdout). Audience targeting is set with a structured rule_conditions rule, which is compiled into the audience's expression and drives expression_cel for modern SDKs; omit it to match all users. The legacy raw expression field is no longer accepted. Requires campaigns:write scope.

post/v2/campaigns

Request body

application_idstring required

ID of the application to create the campaign in

descriptionstring required

Description of the campaign

notesstring nullable

Internal notes about the campaign

Example request

{
  "audiences": [
    {
      "rule_conditions": {
        "operator": "and",
        "conditions": [
          {
            "type": "condition",
            "lhs": {
              "type": "property",
              "value": "device.appVersion"
            },
            "operator": "gte",
            "rhs": {
              "type": "string",
              "value": "1.2.3"
            }
          }
        ]
      }
    }
  ]
}

Response

Success

idstring required

Unique identifier for the campaign

object'campaign' required

Object type, always campaign

application_idstring required

ID of the application this campaign belongs to

descriptionstring required

Description of the campaign

notesstring nullable required

Internal notes about the campaign

is_legacyboolean required

Whether this is a legacy campaign

is_prioritizedboolean required

Whether this campaign is prioritized for config preloading. At most one campaign per application may be prioritized.

created_atstring required

ISO 8601 timestamp of when the campaign was created

updated_atstring required

ISO 8601 timestamp of when the campaign was last updated

archivedboolean required

Whether the campaign is archived

Changes

No recorded changes to this endpoint across all 1 revision of this API.