Update Creative Template

This updates a new creative template for your network and for all associated creatives. This endpoint is also used for archiving a creative template.

You can either update individual parameters on the creative template or you can send a whole template to be updated.

Request

The body of the request is a JSON Updates object that contains one or more objects with the following:

Key

Type

Example

Path
(vector)

Required. A vector representing a path to an nested element: each element indicates a “level” of the underlying object.

A path of [] means "the whole object". Use this path to update the entire template in its entirety.

[ "Fields", 0, "Description" ] refers to the Description property of the first creative template field. (Note the zero-indexing)

Op
(string)

The operation to perform on the Path. Choose one from Update, Delete, InsertAfter. Defaults to update

Delete

Value
(As appropriate)

Required only for Update or InsertAfter. The new value to use with the Op. A value of [] used with "Update" deletes all the elements of the .Path

false

"New Description"

{ "Name" : "A new field", ... }

❗️

You cannot update the Type, Required, AdQuery, or Variable name of an existing field.

🚧

Updating a creative template will update all creatives that use that template. These changes will take effect immediately in ad serving.

Error Handling

Errors will be returned in an Errors object. This object will detail the Original state of the template, the intended Updates, the Proposed template after updates, and the Errors in question.

{
  "Errors": [
    {
      "Details": {
        "Original": {
          "Id": 198,
          "Name": "to be updated",
          "Description": "v1",
          "IsArchived": false,
          "Fields": [
            {
              "Name": "Awesome Thing",
              "Description": "Awesomeness to display",
              "Required": true,
              "Variable": "ctAwesome",
              "Type": "String"
            }
          ],
          "Contents": [
            {
              "Type": "HTML",
              "Body": "Guess what is awesome? {{ctAwesome}} is!"
            }
          ]
        },
        "Updates": [
          {
            "Path": [
              "Fields",
              0
            ],
            "Op": "InsertAfter",
            "Value": {}
          }
        ],
        "Proposed": {
          "Id": 198,
          "Name": "to be updated",
          "Description": "v1",
          "IsArchived": false,
          "Fields": [
            {},
            {
              "Name": "Awesome Thing",
              "Description": "Awesomeness to display",
              "Required": true,
              "Variable": "ctAwesome",
              "Type": "String"
            }
          ],
          "Contents": [
            {
              "Type": "HTML",
              "Body": "Guess what is awesome? {{ctAwesome}} is!"
            }
          ]
        },
        "Errors": [
          {
            "Path": [
              "Fields",
              0
            ],
            "Value": {},
            "Message": "Value at '[\"Fields\" 0]' does not contain required key(s) 'Type', 'Variable', and 'Name'."
          }
        ]
      },
      "Message": "The proposed changes would result in an invalid creative template"
    }
  ]
}
Language
Authentication
Header