REST Resource: campaigns

Resource: Campaign

A campaign resource represents a specific content owner campaign, which allows the content owner to use annotations to promote content on claimed, user-uploaded videos. For example, a content owner could create a campaign that adds links to a movie's watch page for any claimed, user-uploaded videos that contain scenes from that movie. A YouTube content owner can create up to 5000 campaigns.

JSON representation
{
  "kind": string,
  "status": string,
  "campaignData": {
    object (CampaignData)
  },
  "timeCreated": string,
  "timeLastModified": string,
  "id": string
}
Fields
kind

string

The type of the API resource. For campaign resources, this value is youtubePartner#campaign.

status

string

The status of the campaign.

campaignData

object (CampaignData)

The campaignData object contains details like the campaign's start and end dates, target and source.

timeCreated

string

The time the campaign was created.

timeLastModified

string

The time the campaign was last modified.

id

string

The unique ID that YouTube uses to identify the campaign.

CampaignData

This object contains detail information about a campaign such as the start and end date, the target and the source of a campaign.

JSON representation
{
  "name": string,
  "startTime": string,
  "expireTime": string,
  "campaignSource": {
    object (CampaignSource)
  },
  "promotedContent": [
    {
      object (PromotedContent)
    }
  ]
}
Fields
name

string

The user-given name of the campaign.

startTime

string

The time at which the campaign should start. Do not specify a value if the campaign should start immediately.

expireTime

string

The time at which the campaign should expire. Do not specify a value if the campaign has no expiration time.

campaignSource

object (CampaignSource)

The campaignSource object contains information about the assets for which the campaign will generate links.

promotedContent[]

object (PromotedContent)

A list of videos or channels that will be linked to from claimed videos that are included in the campaign.

CampaignSource

A campaignSource resource contains the type and values of the sources for a campaign that determine which videos will be promoted with promotional content.

JSON representation
{
  "sourceType": string,
  "sourceValue": [
    string
  ]
}
Fields
sourceType

string

The type of the campaign source.

sourceValue[]

string

A list of values of the campaign source.

PromotedContent

This object contains the links as the promotional target of a campaign.

JSON representation
{
  "link": [
    {
      object (CampaignTargetLink)
    }
  ]
}
Fields

Methods

delete

Deletes a specified campaign for an owner.

get

Retrieves a particular campaign for an owner.

insert

Insert a new campaign for an owner using the specified campaign data.

list

Retrieves a list of campaigns for an owner.

patch

Patch the data for a specific campaign.

update

Update the data for a specific campaign.