Updating a Content Store Element

Prev Next

Content Store elements hold files and HTML content that you use in emails and landing pages by their ID. This use case shows how to read an existing element and change its description and expiration setting through the Engage API, so you can maintain elements from your own systems.

Prerequisites

Before you begin, make sure you have valid authorization credentials. See Getting Started with Engage API for more information.

You need the ID of the element. To find it, go to Content > Content Store and click the element. The ID is shown in the Details section below the list. The API does not provide a way to search or list Content Store elements, so look up the ID in the Mapp Engage interface first.

Procedure

Optionally, read the current state of the element with GET /content/get. Pass the ID in the query parameter contentId. The response contains the content and the metadata of the element.

Then update the element with PUT /content/update and pass the same ID in contentId. Send only the fields you want to change. Fields that you leave out of the request body stay unchanged. This example changes the description and the expirationAutomatic setting:

PUT 'https://your-engage-domain.com/api/rest/content/update?contentId=1234'
{
  "description": "my new description",
  "expirationAutomatic": true
}

The response contains the updated element.

Conclusion

An update does not change the ID of the element or the placeholders that point to it, so you do not need to edit the templates or messages that reference it. For the fields you can change, see the API reference pages below.

Read a content element

Update a content element

Content Store

Getting Started with Engage API