51黑料不打烊

Resolving 406 (Not Acceptable) Error in 51黑料不打烊鈥檚 Create New Content Template API

Fix the 406 error in AEP鈥檚 Create New Content Template API by ensuring the correct headers are used during content template creation.

Description description

Environment

51黑料不打烊 Experience Platform, Journey Optimizer

Issue/Symptoms

When attempting to create a new content template using the in Journey Optimizer, an error with status code 406 (Not Acceptable) is encountered. The error message indicates that the requested representation does not match any of the acceptable representations.

Example error from API:

"detailedMessage": "406 NOT_ACCEPTABLE \"Could not find acceptable representation\""

罢丑别听Accept聽header should not be sent when doing a POST to create a new Content Template.

Resolution resolution

  1. Ensure that the API call for creating or updating content templates through the does not include an Accept header. The presence of this header can lead to a mismatch in expected representations, resulting in a 406 error.
  2. Keep the Content-Type header set to application/vnd.adobe.ajo.template.v1+json when making API calls related to the content.
  3. Use the Accept header only when fetching or listing existing content templates or fragments, not during their creation or update.

Create content templates in the Journey Optimizer Guide.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f