---
updatedAt: 2026-08-01T11:27:33.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Get Campaign

## Why Get a Campaign?

Sometimes, you may wish to return parameters for a specific campaign so you can review flights and ads associated with that campaign. To return the parameters for a campaign, be sure to pass the `CampaignID` in your request.

## API Syntax

When using the Get Campaign 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:

`GET https://api.kevel.co/v1/campaign/{CampaignID}`

Where:

* `GET` - 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.
* `CampaignID` - the ID associated with the campaign.

> 📘 Note
>
> Instead of returning flight objects, the `Flights` parameter will return with a value of `null`.

# 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/{CampaignID}": {
      "get": {
        "summary": "Get Campaign",
        "description": "",
        "operationId": "get-campaigns",
        "parameters": [
          {
            "name": "CampaignID",
            "in": "path",
            "description": "The ID of the Campaign",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "excludeFlights",
            "in": "query",
            "description": "If true, returns only campaign metadata without flight objects. Defaults to `false`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "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  \"CapType\": null,\n  \"IsFreqCap\": null,\n  \"IsDeleted\": false,\n  \"EndDateISO\": null,\n  \"Price\": 0.00,\n  \"IsArchived\": true,\n  \"LifetimeCapAmount\": null,\n  \"FreqCapDuration\": null,\n  \"FreqCap\": null,\n  \"SalespersonId\": null,\n  \"AdvertiserId\": 12345,\n  \"Name\": \"Nike Q4 Campaign\",\n  \"Id\": 56789,\n  \"CustomFieldsJson\": null,\n  \"StartDateISO\": \"2017-03-11T00: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
                    },
                    "CapType": {},
                    "IsFreqCap": {},
                    "IsDeleted": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "EndDateISO": {},
                    "Price": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "IsArchived": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "LifetimeCapAmount": {},
                    "FreqCapDuration": {},
                    "FreqCap": {},
                    "SalespersonId": {},
                    "AdvertiserId": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "Name": {
                      "type": "string",
                      "example": "Nike Q4 Campaign"
                    },
                    "Id": {
                      "type": "integer",
                      "example": 56789,
                      "default": 0
                    },
                    "CustomFieldsJson": {},
                    "StartDateISO": {
                      "type": "string",
                      "example": "2017-03-11T00:00:00.0000000"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X GET -H 'X-Adzerk-ApiKey:<APIKEY>' https://api.kevel.co/v1/campaign/56789\n\n# Exclude Flights (returns faster with less data)\ncurl -X GET -H 'X-Adzerk-ApiKey:<APIKEY>' https://api.kevel.co/v1/campaign/56789?excludeFlights=true"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function getCampaign() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let campaign = await client.run(\"campaign\", \"get\", {id: 12345});\n  console.log(campaign);\n}\n\ngetCampaign();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef get_campaign()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    campaign_id = 12345\n    pp client.campaigns.get(campaign_id)\nend\nget_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
}
```