Update content

To update existing content, you need to first prepare the request payload and then do a POST to the endpoint UpdateContent as part of the body.

{
   "slug":"[Your Slug]",
   "content":{
      "countryCode":null, //Country Code if any
      "deviceType":null, //Device type if any
      "sentiment":null, //Sentiment type if any
      "fields":[
         {
            "name":"[Field name]",
            "value":"[Field value]"
         },
         {
            "name":"[Field name]",
            "value":"[Field value]"
         }
      ],
      "id":"[The content id]"
   },
   "accessToken":"[Your Access Token]"
}

Once you call the endpoint, you will now get a response which will indicate if your content was added successfully.

Please note, all the contents that are updated will be saved as a draft version. You will need to deploy your Dialogue for it to be available. To understand further, please have a look at Deploying your Dialogue.