PATCH

Bulk Update Draft Posts


Updates multiple draft posts.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Blog
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/blog/v3/draft-posts/update

Body Params
draftPostsArray <MaskedDraftPosts>minItems 1maxItems 20

Draft posts to update.


actionstring

Action to perform on the posts.

Default: UPDATE


scheduledPublishDatestringformat date-time

Posts' scheduled publish date when action is set to UPDATE_SCHEDULE.


returnFullEntityboolean

Whether to return the full updated draft post entities in the response.


fieldsetsArray <string>maxItems 10

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.

Response Object
resultsArray <BulkDraftPostResult>

Draft posts updated by bulk action.


bulkActionMetadataBulkActionMetadata

Bulk action metadata.

Bulk Update Draft Posts Example 1
Request
cURL
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", }'
Response
JSON
{ "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 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?