Updates multiple draft posts.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft posts to update.
Action to perform on the posts.
Default: UPDATE
Posts' scheduled publish date when action
is set to UPDATE_SCHEDULE
.
Whether to return the full updated draft post entities in the response.
List of additional draft post fields to include in the response. For example, use the URL
fieldset to retrieve the url field in
the response in addition to the draft post's base fields. Base fields don’t include any of the supported fieldset values. By default
only the draft post's base fields are returned.
Draft posts updated by bulk action.
Bulk action metadata.
curl -X PATCH \
'https://www.wixapis.com/blog/v3/draft-posts/update' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
-d '{
"draftPosts": [
{
"draftPost": {
"id": "448d1238-0072-4458-a280-bf81c2dd8af1",
"seoSlug": "places-to-visit-in-europe"
}
},
{
"draftPost": {
"id": "d1c6418d-322b-4976-a815-80ee35c2a5e7",
"seoSlug": "places-to-visit-in-america"
}
}
],
"action": "UPDATE_AND_PUBLISH",
}'
{
"results": [
{
"itemMetadata": {
"id": "448d1238-0072-4458-a280-bf81c2dd8af1",
"originalIndex": 0,
"success": "true"
}
},
{
"itemMetadata": {
"id": "d1c6418d-322b-4976-a815-80ee35c2a5e7",
"originalIndex": 1,
"success": "true"
}
}
],
"bulkActionMetadata": {
"totalSuccesses": 2,
"totalFailures": 0,
"undetailedFailures": 0
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.