Skip to content

Zalo — Articles ​

Create article — zalo.create_article ​

Create an OA article. Zalo processes it asynchronously and returns a token; pass it to verify_article to get the article ID.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
typeanyyesArticle type. One of: normal.
titlestringyesArticle title.
authorstringyesAuthor name.
coverobjectyesCover photo: cover_type 'photo', photo_url, status show/hide.
cover.cover_typeanyyesOne of: photo.
cover.photo_urlstringyes
cover.statusanynoOne of: show, hide.
descriptionstringyesShort summary shown in the feed.
bodyarray of objectyesOrdered content blocks.
body[].typeanyyesOne of: text, image.
body[].contentstringnoText of a text block.
body[].urlstringnoImage URL of an image block.
statusanynoArticle visibility. One of: show, hide.
commentanynoWhether comments are shown. One of: show, hide.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the request.
data.tokenstringToken of the asynchronous job. Pass it to verify_article to get the article ID.

Verify article — zalo.verify_article ​

Get the article ID of a created article from its token. Error -214 means it is still processing.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
tokenstringyesToken from create_article.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectThe created or updated article.
data.idstringID of the article.

Update article — zalo.update_article ​

Update an OA article. Zalo returns a token to verify, as for create_article.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
idstringyesArticle ID.
typeanyyesArticle type. One of: normal.
titlestringyesArticle title.
authorstringyesAuthor name.
coverobjectyesCover photo: cover_type 'photo', photo_url, status show/hide.
cover.cover_typeanyyesOne of: photo.
cover.photo_urlstringyes
cover.statusanynoOne of: show, hide.
descriptionstringyesShort summary shown in the feed.
bodyarray of objectyesOrdered content blocks.
body[].typeanyyesOne of: text, image.
body[].contentstringnoText of a text block.
body[].urlstringnoImage URL of an image block.
statusanynoArticle visibility. One of: show, hide.
commentanynoWhether comments are shown. One of: show, hide.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the request.
data.tokenstringToken of the asynchronous job. Pass it to verify_article to get the article ID.

List articles — zalo.list_articles ​

List OA articles, newest first.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
offsetintegeryesMin 0.
limitintegeryesMin 1. Max 100.
typeanyyesOne of: normal, video.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectA page of articles.
data.mediasarray of objectArticles on this page. Fields of video items are not documented.
data.medias[].idstringID of the article.
data.medias[].typestringnormal or video.
data.medias[].titlestringTitle.
data.medias[].statusstringshow or hide.
data.medias[].total_viewintegerNumber of views.
data.medias[].total_shareintegerNumber of shares.
data.medias[].create_dateintegerCreation time, Unix timestamp in milliseconds.
data.medias[].update_dateintegerLast update time, Unix timestamp in milliseconds.
data.medias[].thumbstringURL of the thumbnail.
data.medias[].link_viewstringURL to view the article.
data.totalintegerTotal number of articles of this type.

Get article — zalo.get_article ​

Get the detail of one OA article.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
idstringyesArticle ID.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectThe article. A normal article returns the content fields; a video article returns the upload fields. The reference has examples only, no field table.
data.idstringID of the article. Normal articles only.
data.typestringArticle type, normal. Normal articles only.
data.titlestringTitle. Normal articles only.
data.authorstringAuthor name. Normal articles only.
data.coverobjectCover. Normal articles only.
data.cover.cover_typestringCover type, e.g. photo.
data.cover.photo_urlstringURL of the cover photo.
data.cover.statusstringshow or hide.
data.descriptionstringSummary. Normal articles only.
data.statusstringshow or hide for a normal article; for a video article, the numeric upload status (1 in the example for a finished upload).
data.bodyarray of objectContent blocks. Normal articles only.
data.body[].typestringBlock type, e.g. text.
data.body[].contentstringText of a text block.
data.related_mediasarray of objectRelated articles. Normal articles only.
data.commentstringWhether comments are shown, show or hide. Normal articles only.
data.citeobjectSource citation. Normal articles only. The reference spells the label key lablel.
data.cite.urlstringSource URL.
data.cite.lablelstringSource label (spelled this way by Zalo).
data.status_messagestringUpload status text. Video articles only.
data.video_namestringFile name of the video. Video articles only.
data.video_sizeintegerSize of the video in bytes. Video articles only.
data.convert_percentintegerConversion progress, 0 to 100. Video articles only.
data.convert_error_codeintegerConversion error code, 0 when none. Video articles only.
data.video_idstringID of the video. Video articles only.

Remove article — zalo.remove_article ​

Permanently remove an OA article.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
idstringyesArticle ID.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectNot returned: Zalo replies only error and message.