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:
Setting | Value |
---|---|
Category | Content |
Model | Topics, v1 |
Operation | update(*) |
topics_group_id | (Enter the target topic group ID / content structure ID) |
To create a new content post via API, enter [insert] instead of [update] as the "Operation" setting.
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
}
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.)
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.