---
updatedAt: 2026-08-01T11:27:33.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# 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.

## Why Update a Creative Template

There may come a time when you need to update an existing creative template that is part of your network. The Update Creative Template API endpoint enables you to not only update a new creative template for your network and all associated creatives, but you can also use this endpoint to archive a creative template by updating individual parameters on the creative template, or sending the entire template to be updated.

## API Syntax

When using the Update Creative Template API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`POST https://api.kevel.co/v2/creative-templates/{CreativeTemplateID}/update`

Where:

* `POST` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v2` - the API version.
* `creative-templates` - the API endpoint being called.
* `CreativeTemplateID` - the ID associated with the creative template you want to update.
* `update` - the action being taken with this API call.

## Request Format

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

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Key
      </th>

      <th>
        Type
      </th>

      <th>
        Example
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `Path`
        (vector)
      </td>

      <td>
        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.
      </td>

      <td>
        `[ "Fields", 0, "Description" ]` refers to the Description property of the first creative template field. (Note the zero-indexing)
      </td>
    </tr>

    <tr>
      <td>
        `Op`\
        (string)
      </td>

      <td>
        The operation to perform on the `Path`. Choose one from `Update`, `Delete`, `InsertAfter`. Defaults to `update`
      </td>

      <td>
        `Delete`
      </td>
    </tr>

    <tr>
      <td>
        `Value`\
        (As appropriate)
      </td>

      <td>
        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`
      </td>

      <td>
        false

        "New Description"

        \{ "Name" : "A new field", ... }
      </td>
    </tr>
  </tbody>
</Table>

> ❗️ Warning
>
> You cannot update the `Type`, `Required`, `AdQuery`, or `Variable`  name of an existing field.

> 🚧 Caution
>
> 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.

```json Errors object from a creative template update
{
  "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"
    }
  ]
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/creative-templates/{CreativeTemplateID}/update": {
      "post": {
        "summary": "Update Creative Template",
        "description": "This updates a new creative template for your network and for all associated creatives. This endpoint is also used for archiving a creative template.\n\nYou can either update individual parameters on the creative template or you can send a whole template to be updated.",
        "operationId": "update-creative-template-1",
        "parameters": [
          {
            "name": "CreativeTemplateID",
            "in": "path",
            "description": "The ID from Create Creative Template",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "// The response will contain the updated creative template JSON object."
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "## Update template (individual parameters)\ncurl -X POST -H \"X-Adzerk-ApiKey: $ADZERK_API_KEY\" -H \"Content-Type: application/json\" -d '{\"Updates\":[{\"Path\":[\"Fields\",0,\"Description\"], \"Op\":\"Update\", \"Value\":\"New description\"}]}' https://api.kevel.co/v2/creative-templates/1234/update\n\n## Update template in its entirety\ncurl -X POST -H \"X-Adzerk-ApiKey: $ADZERK_API_KEY\" -H \"Content-Type: application/json\" -d '{\"Updates\":[{\"Path\":[], \"Op\":\"Update\", \"Value\":{\"Description\": \"v2\", \"Name\": \"Awesome Template\", \"IsArchived\": false, \"Fields\": [{\"Name\": \"Awesome Thing One\", \"Description\": \"Awesomeness to display\", \"Type\": \"String\", \"Required\": true, \"Variable\": \"ctThingOne\"}, {\"Name\": \"Awesome Thing Two\", \"Description\": \"A second thing to (maybe) display\", \"Type\": \"String\", \"Required\": false, \"Variable\": \"ctThingTwo\"} ], \"Contents\": [{\"Type\": \"HTML\", \"Body\": \"Guess what is awesome? {{ctThingOne}} is!\"}]}}]}' https://api.kevel.co/v2/creative-templates/12345/update \n\n## Archive template\ncurl -X POST -H \"X-Adzerk-ApiKey: $ADZERK_API_KEY\" -H \"Content-Type: application/json\" -d '{\"Updates\":[{\"Path\":\"IsArchived\",\"Value\":true}]}' https://api.kevel.co/v2/creative-templates/1234/update"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function updateCreativeTemplate() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let updatedCreativeTemplate = await client.run('creativeTemplate', 'update', {\n    id: 12345,\n    updates: [{\n      path: ['Description'],\n      value: 'Updated Creative Template Description'\n    }, {\n      path: ['Fields', 1],\n      op: 'InsertAfter',\n      value: {\n        name: 'Body',\n        description: 'The Body of an Ad',\n        type: 'String',\n        variable: 'ctBody',\n        required: false,\n        adQuery: true,\n      },\n    }],\n  });\n  console.log(updatedCreativeTemplate);\n}\n\nupdateCreativeTemplate();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef update_creative_template()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    creative_template_id = 1234\n    data = {\n        updates: [{\n            path: ['Description'],\n            value: 'Updated Creative Template Description'\n        }, {\n            path: ['Fields', 1],\n            op: 'InsertAfter',\n            value: {\n                name: 'Body',\n                description: 'The Body of an Ad',\n                type: 'String',\n                variable: 'ctBody',\n                required: false,\n              \tad_query: true,\n            }\n        }]\n    }\n    pp client.creative_templates.update(creative_template_id, data)\nend\nupdate_creative_template()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```