Vor Kurzem aufgerufene Suchen


Keine vor kurzem aufgerufene Suchen

How to update the html body of an article using the Help Center API



Gepostet 05. Aug. 2021

Hi,

I want to periodically update the html body of a specified Help Center article.

I guess I should use

PUT /api/v2/help_center/articles/{article_id}/translations/{locale} 

but I don't know how to pass the html body. Does anyone have a template or a sample ?

Thanks for your help.


0

1

1 Kommentar

image avatar

Charles Nadeau

Zendesk Documentation Team

Hi Michel,

You’d add the article content to the body property of the translation. Example:

{"translation": {"body": "This article contains tips and tricks."}}

However, the API expects JSON data. While the simple string in the example above is valid JSON, most articles have lots of HTML markup and other characters that mess up the JSON and invalidate the request.

So always convert the article body to JSON before sending it in the request. For instructions and examples, see Converting data in your code to JSON.

 

0


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post