---
updatedAt: 2026-09-29T23:38:36.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Create Campaigns

<Callout icon="📢" theme="default">
  ### Create Campaign v2 now available!

  Version 2 of the Create Campaign endpoint allows you to create a Campaign, Flight(s), Creative(s), and Ad(s) in a single request, all with significantly reduced latency. Visit the [Create Campaign V2 documentation page](https://dev.kevel.com/reference/create-campaign-v2) for more details.
</Callout>

## Why Create a Campaign?

A campaign can be thought of as a collection of flights, which contain the advertiser's ads. Typically flights in a campaign have a common theme, such as a product or promotion.

The Create Campaigns API call creates a new campaign under an advertiser.

For more detailed information about campaigns, please refer to the [Campaigns](https://dev.kevel.com/docs/campaigns) technical documentation.

## API Syntax

When using the Create Campaigns API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`POST https://api.kevel.co/v1/campaign`

Where:

* `POST` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `campaign` - the API endpoint being called.

## Additional Parameters

The table below lists a few additional parameters that can be passed as part of the API request to the server.

| Property           | Description                                                                                                                           |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
| `SalespersonId`    | Network-level login Id of salesperson                                                                                                 |
| `CustomFieldsJson` | Sets the value of custom fields based on a custom fields schema. Must contact support before use. More info [here](https://dev.kevel.com/docs/custom-fields) |

## Additional Resources

For more info on the Frequency Capping parameters, visit the [Frequency Capping](https://dev.kevel.com/docs/campaign-frequency-capping-1) technical documentation

For more info on the Budget Capping parameters, visit the [Budget Capping](https://dev.kevel.com/docs/ad-capping#budget-capping) technical documentation.

<br />

> ❗️ Campaign Start and End Dates
>
> It is not possible to set Start and End Dates on the Campaign level. They will, however, populate in API responses and in the UI based on the start and end dates of the flight(s) within the campaign.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/campaign": {
      "post": {
        "summary": "Create Campaigns",
        "description": "",
        "operationId": "create-campaigns",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "AdvertiserId",
                  "Name"
                ],
                "properties": {
                  "AdvertiserId": {
                    "type": "integer",
                    "description": "The advertiser's ID for the campaign.",
                    "format": "int32"
                  },
                  "Name": {
                    "type": "string",
                    "description": "The campaign name."
                  },
                  "Flights": {
                    "type": "array",
                    "description": "You can pass an array of flights, a blank array, or not include. See [Create Flight](ref:create-flight) endpoint.",
                    "items": {
                      "type": "integer",
                      "format": "int32"
                    }
                  },
                  "IsActive": {
                    "type": "boolean",
                    "description": "Specifies whether campaign should be active (serving ads). Defaults to `false`.",
                    "default": false
                  },
                  "IsDeleted": {
                    "type": "boolean",
                    "description": "Specifies whether campaign should be deleted. Do not use when creating a campaign."
                  },
                  "IsArchived": {
                    "type": "boolean",
                    "description": "Specifies whether campaign should be archived. Do not use when creating a campaign."
                  },
                  "FreqCap": {
                    "type": "integer",
                    "description": "The number of times the frequency cap should occur.",
                    "format": "int32"
                  },
                  "FreqCapDuration": {
                    "type": "integer",
                    "description": "Specifies how often the frequency cap should occur.",
                    "format": "int32"
                  },
                  "FreqCapType": {
                    "type": "integer",
                    "description": "The enum value for how often frequency capping should occur. `1 = Hour 2 = Day 3 = Minute`.",
                    "format": "int32"
                  },
                  "DontAffectParentFreqCap": {
                    "type": "boolean",
                    "description": "\"Opts-out\" campaign from advertiser-level frequency cap settings."
                  },
                  "CapType": {
                    "type": "integer",
                    "description": "Set to `CapType = 4`. Campaigns can only budget cap on revenue metric. Do not set to `0` - if removing, set to `null`.",
                    "format": "int32"
                  },
                  "DailyCapAmount": {
                    "type": "integer",
                    "description": "The max daily revenue.",
                    "format": "int32"
                  },
                  "LifetimeCapAmount": {
                    "type": "integer",
                    "description": "The max lifetime revenue.",
                    "format": "int32"
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "AdvertiserId": 12345,
                    "Name": "Nike Q4 Campaign",
                    "IsActive": true,
                    "FreqCap": 2,
                    "FreqCapDuration": 10,
                    "FreqCapType": 1,
                    "DontAffectParentFreqCap": true,
                    "CapType": 4,
                    "DailyCapAmount": 5000,
                    "LifetimeCapAmount": 50000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"IsActive\": false,\n  \"DontAffectParentFreqCap\": null,\n  \"Flights\": [],\n  \"DailyCapAmount\": null,\n  \"FreqCapType\": 0,\n  \"EndDate\": null,\n  \"CapType\": null,\n  \"IsFreqCap\": false,\n  \"IsDeleted\": false,\n  \"EndDateISO\": null,\n  \"Price\": 0,\n  \"IsArchived\": false,\n  \"LifetimeCapAmount\": null,\n  \"FreqCapDuration\": null,\n  \"FreqCap\": null,\n  \"SalespersonId\": null,\n  \"AdvertiserId\": 12345,\n  \"Name\": \"Nike Q4 Campaign\",\n  \"Id\": 123456,\n  \"CustomFieldsJson\": null,\n  \"StartDateISO\": \"2017-01-01T00:00:00.0000000\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "IsActive": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "DontAffectParentFreqCap": {},
                    "Flights": {
                      "type": "array"
                    },
                    "DailyCapAmount": {},
                    "FreqCapType": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "EndDate": {},
                    "CapType": {},
                    "IsFreqCap": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsDeleted": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "EndDateISO": {},
                    "Price": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "IsArchived": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "LifetimeCapAmount": {},
                    "FreqCapDuration": {},
                    "FreqCap": {},
                    "SalespersonId": {},
                    "AdvertiserId": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "Name": {
                      "type": "string",
                      "example": "Nike Q4 Campaign"
                    },
                    "Id": {
                      "type": "integer",
                      "example": 123456,
                      "default": 0
                    },
                    "CustomFieldsJson": {},
                    "StartDateISO": {
                      "type": "string",
                      "example": "2017-01-01T00:00:00.0000000"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "## The example below is a minimally viable campaign: \ncurl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H \"Content-Type:application/json\" \"https://api.kevel.co/v1/campaign\" --data-binary '{\"Name\":\"Nike Q4 Campaign\",\"AdvertiserId\":12345,\"IsActive\":true}'"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function createCampaign() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let campaign = await client.run(\"campaign\", \"create\", {\n    name: \"Nike Q4 Campaign\",\n    advertiserId: 12345,\n    isActive: false, // TIP: create inactive so nothing serves until ready!\n  });\n\n  console.log(campaign);\n}\n\ncreateCampaign();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef create_campaign()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    data = {\n        name: \"Campaign Name\",\n        advertiser_id: 12345,\n        is_active: false # TIP: campaign should start inactive so nothing serves until ready!\n    }\n    pp client.campaigns.create(data)\nend\ncreate_campaign()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```