Skip to content

Create companion ad - V3

Request

Post new companion details and receive the new companion ID. Regenerates the creative's MetaVAST document after the companion is created.

Path
creativeIdintegerrequired

Creative ID

Bodyapplication/jsonrequired

Companion ad details

detailsobject(CompanionDetails)required
fileExtensionstring

File extension

fileNamestring

File name

resourceUrlstring

Resource URL for all other companion types

resourceDatastring

Resource data encoded in Data URI Scheme for static companion types

curl -i -X POST \
  'https://api.mediamath.com/v3.0/creatives/{creativeId}/companions' \
  -H 'Content-Type: application/json' \
  -d '{
    "details": {
      "adServer": "string",
      "typ": "static",
      "width": 32,
      "height": 32,
      "landingUrl": "string",
      "iFrameUrlOrHTML": "string",
      "clickthroughUrl": "string"
    },
    "fileExtension": "string",
    "fileName": "string",
    "resourceUrl": "string",
    "resourceData": "string"
  }'

Responses

Companion created successfully

Bodyapplication/json
companionIdinteger
Response
{ "companionId": 0 }