2

i have pushed a content using REST API in content Builder, now i want to update the content that is pushed, im trying to use PUT and PATCH for the same but its giving 500 internal server error. Below is the payload that im trying to pass

EndPoint URL that i'm using for PUT/PATCH is https://www.exacttargetapis.com/asset/v1/content/assets/{20843}

{
  "customerKey":"f62c1eee-faa0-4059-8644-d99b139dc371",     
  "name": "emailtest_8",
    "views": {
    "html": {
      "content": "<!DOCTYPE html><body>This is a simple html paste email.</body></html>"
    }
    },
    "assetType": {
    "name": "htmlemail",
    "id": 208
   }
}   

I have tried using POSTMAN rest client to test but still it says

500 internal server error.

Any help is much appreciated

4
  • Salesforce doesn't support the PATCH method for HttpRequests.... so there's a rabbit hole you can avoid going down. Jan 17, 2018 at 14:07
  • Incorrect - SFMC does allow the PATCH method. Jan 17, 2018 at 14:56
  • 1
    on your endpoint, remove the curly brackets {} and leave just the ID number Jan 17, 2018 at 14:56
  • 1
    @Gortonington thanks mate, PATCH is working now. Is PUT method supported for httprequest?
    – Abhishek
    Jan 18, 2018 at 8:24

1 Answer 1

2

Your endpoint does not need the curly brackets around it. Remove {} from around your ID number and your call should work perfectly.

SFMC does allow the following:

  1. POST
  2. GET
  3. PUT
  4. PATCH
  5. DELETE

This is shown in the REST API reference section of the help docs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .