Create Placement

POST /placement

Use this method to create a new placement.

Headers

Name
Value

Authorization

Basic <token>

Body

{
  name: string, // Name must only contain alphabets, numeric and space
  is_archived?: boolean,
  account: {
    id: number, // Mandatory, accountId (looks like 1234)
    name?: string,
  },
  tag_id: {     // Default tagId
    id: string, // Mandatory, tagId (looks like '0bonobfw')
    name?: string,
  },
  mappings?: [  // Array of targeted elements
    {
      id?: number, // Optional, for updating existing mappings
      tag_id: {
        id: string, // Mandatory, tagId (looks like '0bonobfw')
        name?: string,
      },
      mapping: {
        adunit_code?: string[],
        bundle?: string[],
        country?: string[], // Array of country codes (e.g. 'FR', 'US')
        device?: string[], // desktop | mobile | tablet | tv | other
        domain?: string[], // Must be in this format 'domain.com'
        gam_ad_unit_path?: string[], // GAM ad unit path. Supports '*' wildcards matching any characters including '/' (e.g. '/5144/desktop/vip/*', '/4216/usweekly/mb-sticky*')
        gpid?: string[], // Supports '*' wildcards matching any characters including '/' (e.g. '/5144/desktop/vip/*', '/4216/usweekly/mb-sticky*')
        mediatype?: string[], // audio | banner | native | video
        size?: { w: number, h: number }[], // Array of sizes
      },
      placement?: {
        id: number, // Optional, link to existing placement
        name?: string,
      },
    }
  ]
}

Response

Last updated

Was this helpful?