Patching an item between "draft" and "published"


I have created a lot of items as drafts. Now I’d like to publish/stage them. I have tried patching them with attributes:
{ ‘_draft’ = false}
{’_draft’ = false} and ‘?live=true’
but neither changes its status from draft.

Do I need to stage/publish the items manually now? Or is there a way to do it with Patch Item or a different API call?

Thank you!

edited: true -> false

Isn’t it
"_draft": false

1 Like

oops, yes I meant to say I have been trying "_draft": false with no success.

I have the same problem

I can’t toggle _draft false/true no matter what I do

In case its not solved yet → You have to use updateItem instead of patchItem to toggle from draft to published item. Furthermore, you have to set live=true in the updateItem API Call.


1 Like

Same problem here, trying to auto draft / undraft ecommerce products:

  • patching product (from ecommerce) with {"_draft": false} or {"_draft": true} does nothing (aka _draft value unchanged, either before or after manual publish, either with ?live=true or without)

  • patching collection item (of product collection) with {"_draft": false} or {"_draft": true} does nothing (either with ?live=true or without)

  • PUT collection item (of product collection) is refused by webflow if I PUT all the fields "{“msg”:“User is not authorized to perform this action: Cannot complete operation for the ecommerce collection [Produits] with this endpoint.”,“code”:403,“name”:“ForbiddenError” (either with ?live=true or without)

  • PUT after removing read-only fields (published-by, published-on, updated-by, updated-on, created-by, created-on ,_id, _cid) is also refused by webflow(either with ?live=true or without) (same 403 error)

  • even a PUT with only {’_draft’: True} is refused by the same 403 error on the product collection

I do not find any solution to update via API the draft status of an ecommerce product. I’m quite sure it was working some times ago, but since at least november it stopped working.
This is very painful for us, forcing us to update manually each product.

1 Like

Any solution for this? Currently having this issue trying to set “_draft” to true

Also having the same issue that @Mike929 is having.