Posts
Change Post Status
PUT /posts/{id}/status — Infipost Public API
Moves a post between `draft` and `schedule` state. - `schedule` → sets the post state to `QUEUE` and (re)starts the publishing workflow so it will be published at its stored date. - `draft` → sets the post state to `DRAFT` and terminates any currently running publishing workflow for the post, so it will not be published. The post keeps its stored date; only the state (and the workflow) changes.
cURL
curl --request PUT \
--url 'https://api.infipost.asia/public/v1/posts/{id}/status' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "schedule"
}'Authorization
Authorizationstring · headerrequiredWorkspace API key or OAuth access token. Send the token directly without a Bearer prefix.
Parameters
idstring · pathrequiredPost ID
Body
statusstringrequiredNew status for the post
"draft""schedule"Response
Post status updated successfully
application/json
{
"id": "post-123",
"state": "QUEUE"
}idstringstatestring"DRAFT""QUEUE"Invalid status or post not found
Bài viết này có hữu ích không?