Skip to main content

Can I add or update approval workflow of content(s) via API?

Yes, you can add or update the approval workflow of a content using an API endpoint.

Procedure​

First, create an empty workflow with no changes to the content. For a detailed guide on how to do this, see Tutorial: Scheduling updates for published contents.

Next, create an endpoint for updating the content with the following settings:

SettingValue
CategoryContent
ModelTopics, v1
Operationupdate(*)
topics_group_id(Enter the target topic group ID / content structure ID)
tip

To create a new content post via API, enter [insert] instead of [update] as the "Operation" setting.

Image from Gyazo Image from Gyazo

In the Swagger UI, try out your endpoint with the content to be updated in the request body.

{
"subject": "Kuroco updates - November 2022",
"contents": "The official version has been released! For more details, visit our official website.",
"open_flg": 1,
"ymd": "2022-11-08",
"approvalflow_id": 2
}
caution

Make sure to substitute your own approval workflow ID in the "approvalflow_id": 2.

You can verify the content pending for approval in the content list.
(If you modified the title/subject of the content, the old title will appear in parentheses.)

Image from Gyazo

To publish the content, simply approve the workflow as usual.

More information​


Support

If you have any other questions, please contact us or check out Our Slack Community.