Create Campaign


                https://api.ocamba.com/v2/adex/campaigns
            

Creates a new campaign object


Name
Description
account_idstringrequired
A unique account identifier generated by the Ocamba platform.


Example: 52794322

descriptionstring
Additional description of campaign, maximum 2000 characters.


Example: Description goes here

end_timedateTime
A time when the campaign employment is over. At this point, campaign status will be automatically changed to 'paused' by backed processes. Timezone: GMT.


Example: 2021-10-29 13:07:04

external_demand_idstring
External demand id created on the Ocamba platform. If external_demand_id is set, the campaign type will be implicitly set to "external" otherwise, the campaign type will be "internal". Pricing model of external demand must match the pricing model of the campaign.


Example: 12341

frequency_capobject

Name
Description
clickobject

Name
Description
expiry_timenumber
Time frame for frequency capping, expressed in hours.


Example: 10

max_countnumber
Max number of times a user sees ads for a given time frame.


Example: 2

conversionobject

Name
Description
expiry_timenumber
Time frame for frequency capping, expressed in hours.


Example: 10

max_countnumber
Max number of times a user sees ads for a given time frame.


Example: 2

impressionobject

Name
Description
expiry_timenumber
Time frame for frequency capping, expressed in hours.


Example: 10

max_countnumber
Max number of times a user sees ads for a given time frame.


Example: 2

metadataobject

Name
Description
keystring
Key for the metadata.
Each key must be unique within the metadata object. Maximum 100 characters.


Example: key1

valuestring
Value for the metadata. Maximum 500 characters.


Example: value1

namestringrequired
Name of the campaign, max 200 characters.


Example: DemoCampaign

pricing_modelstringrequired
Assigning the wanted pricing model to campaign.


Example: cpc

Possible values: cpc | cpm | cpa

scorenumber (integer)
Campaign score. Minimum value - 0, Maximum value - 100.


Example: 78

Default: 50

start_timedateTime
A time when the campaign will be employed. Only campaigns with active status will be employed once the start time is reached. If the start time is not specified, the campaign will start immediately. Timezone: GMT.


Example: 2021-10-20 12:47:00

statusstringrequired
The status of the campaign set by the user. May differ from the actual status of the campaign.


Example: active

Possible values: active | verification | rejected | paused | inactive | archived

Targeting object.
Campaign Targeting
Name
Description
browsersobject

Name
Description
items[ object ]
Array of browser items, maximum length limited by subscription plan.

categoriesobject

Name
Description
itemsarray
Array of strings containing category ids.

opstring
String describing operation. Possible values are eq and neq

connectionsobject

Name
Description
items[ string ]
Array of valid connection types supported by Ocamba.

opstring



Example: nin

Possible values: in | nin

containersobject

Name
Description
items[ string ]
Array of strings containing containers ids. Maximum length limited by subscription plan.

opstring
String describing operation.


Example: in

Possible values: in

countriesobject

Name
Description
items[ string ]
Array of country codes supported by ocamba (ISO 3166-1, 2 letter country codes), maximum length limited by subscription plan. Required if lists is not present.

lists[ string ]
Array of list ids created by the Ocamba platform. Lists must be of type country, maximum length limited by subscription plan. Required if items is not present.

opstring



Example: in

Possible values: in | nin

device_manufacturersobject

Name
Description
items[ string ]
Array of device manufacturer ids, maximum length limited by subscription plan.

opstring



Example: in

Possible values: in | nin

device_trackingnumber (integer)
Describes the status of device tracking.


Example: 1

Possible values: 0 | 1

device_typesobject

Name
Description
items[ string ]
Array of device types, maximum length limited by subscription plan.

opstring



Example: in

Possible values: in | nin

has_user_datanumber (integer)
Describes the availability of user data


Example: 1

Possible values: 0 | 1

ipobject

Name
Description
items[ string ]
Array of ips, each element must be a valid ipv4/cidr, maximum length limited by subscription plan. Required if lists is not present.

lists[ string ]
Array of list ids created by the Ocamba platform. Lists must be of type ip, maximum length limited by subscription plan. Required if items is not present.

opstring



Example: in

Possible values: in | nin

keywordsobject

Name
Description
itemsarray
Array of unique strings containing keywords. One item can be a string with minimum length of 3 and maximum of 150, containing max 20 groups separated by \|. Each group can be made up of these characters: a-zA-Z0-9_%!


Example: keyword01!\|keyword02_%

languagesobject

Name
Description
items[ string ]
Array of unique strings. Each element must be a valid 2-letter language code supported by Ocamba platform, maximum number of items limited by subscription plan.

opstring



Example: nin

Possible values: in | nin

osobject

Name
Description
items[ object ]
Array of os items, maximum length limited by subscription plan.

pagesobject

Name
Description
items[ string ]
Array of domains, maximum length limited by subscription plan. Required if lists is not present.

lists[ string ]
Array of list ids created by the Ocamba platform. Lists must be of type domain, maximum length limited by subscription plan. Required if items is not present.

opstring



Example: in

Possible values: in | nin

regionsobject

Name
Description
items[ string ]
Array of region ids generated by the Ocamba platform, maximum length limited by subscription plan. Required if lists is not present.

lists[ string ]
Array of list ids created by the Ocamba platform. Lists must be of type region, maximum length limited by subscription plan. Required if items is not present.

opstring



Example: in

Possible values: in | nin

subidsobject

Name
Description
items[ string ]
Array of subids, maximum length limited by subscription plan. Required if lists is not present.

lists[ string ]
Array of list ids created by the Ocamba platform. Lists must be of type subid, maximum length limited by subscription plan. Required if items is not present.

opstring



Example: in

Possible values: in | nin

tagsobject

Name
Description
items[ string ]
Array of tag ids, maximum length limited by subscription plan. This field is deprecated and will be removed in future. Please use container as a replacement.

opstring



Example: in

Possible values: in | nin

timeobject

Name
Description
items[ string ]
Array of valid cron expressions, maximum length limited by subscription plan.

opstring



Example: in

Possible values: in | nin

user_ageobject

Name
Description
fromnumber (integer)



Example: 20

time_unitstring



Example: hour

Possible values: hour | day

tonumber (integer)



Example: 30

info
1 If external_demand_id is supplied the type of campaign will be external, otherwise it will be internal.

2 If external_demand_id is supplied the pricing model of the external demand must match the pricing model of the campaign.
note
1 We recommend using containers instead of tags, as tags are deprecated. If both parameters are sent, containers will take priority.

200 Arrow
{
  "name": "example_campaign_name",
  "description": "This is my first campaign.",
  "status": "active",
  "pricing_model": "cpc",
  "account_id": "10073337",
  "targeting": {
    "countries": {
      "items": [
        "RS"
      ],
      "lists": [
        "1838"
      ],
      "op": "in"
    },
    "regions": {
      "items": [
        "2661876"
      ],
      "lists": [
        "2934"
      ],
      "op": "in"
    },
    "subids": {
      "items": [
        "fut_t10_18-24-MULTI_GG"
      ],
      "lists": [
        "1835"
      ],
      "op": "in"
    },
    "ip": {
      "items": [
        "123.523.123.4"
      ],
      "lists": [
        "2691"
      ],
      "op": "in"
    },
    "pages": {
      "items": [
        "ocamba.com"
      ],
      "lists": [
        "2725"
      ],
      "op": "in"
    },
    "containers": {
      "items": [
        "1303"
      ],
      "op": "in"
    },
    "device_types": {
      "items": [
        "console"
      ],
      "op": "in"
    },
    "device_manufacturers": {
      "items": [
        "13"
      ],
      "op": "in"
    },
    "os": {
      "items": [
        {
          "id": "12",
          "op": "in",
          "versions": [
            "10.0"
          ]
        }
      ]
    },
    "browsers": {
      "items": [
        {
          "id": "10",
          "op": "in",
          "versions": [
            "10.0"
          ]
        }
      ]
    },
    "connections": {
      "items": [
        "1"
      ],
      "op": "nin"
    },
    "time": {
      "items": [
        "[0,15,30,45 12,13,14 * 6 1]"
      ],
      "op": "in"
    },
    "device_tracking": 1,
    "has_user_data": 1
  },
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "create_time": "2021-10-29 12:47:00",
  "update_time": "2021-10-30 14:27:26"
}
201 Arrow
{
  "id" : "1001231",
  "company_id": "2233113",
  "account_id": "10073337",
  "creator_id": "1000323",
  "name": "example_campaign_name",
  "description": "This is my first campaign.",
  "status": "active",
  "type": "internal",
  "pricing_model": "cpc",
  "score": 50,
  "targeting": {
    "countries": {
      "items": [
        "RS"
      ],
      "lists": [
        "1838"
      ],
      "op": "in"
    },
    "regions": {
      "items": [
        "2661876"
      ],
      "lists": [
        "2934"
      ],
      "op": "in"
    },
    "subids": {
      "items": [
        "fut_t10_18-24-MULTI_GG"
      ],
      "lists": [
        "1835"
      ],
      "op": "in"
    },
    "ip": {
      "items": [
        "123.523.123.4"
      ],
      "lists": [
        "2691"
      ],
      "op": "in"
    },
    "pages": {
      "items": [
        "ocamba.com"
      ],
      "lists": [
        "2725"
      ],
      "op": "in"
    },
    "containers": {
      "items": [
        "1303"
      ],
      "op": "in"
    },
    "device_types": {
      "items": [
        "console"
      ],
      "op": "in"
    },
    "device_manufacturers": {
      "items": [
        "13"
      ],
      "op": "in"
    },
    "os": {
      "items": [
        {
          "id": "12",
          "op": "in",
          "versions": [
            "10.0"
          ]
        }
      ]
    },
    "browsers": {
      "items": [
        {
          "id": "10",
          "op": "in",
          "versions": [
            "10.0"
          ]
        }
      ]
    },
    "connections": {
      "items": [
        "1"
      ],
      "op": "nin"
    },
    "time": {
      "items": [
        "[0,15,30,45 12,13,14 * 6 1]"
      ],
      "op": "in"
    },
    "device_tracking": 1,
    "has_user_data": 1
  },
  "metadata": {
    "key1": "value1",
    "key2": "value2"             
  },
  "create_time": "2021-10-29 12:47:00",
  "update_time": "2021-10-30 14:27:26"
}