POST

Bulk Create Draft Posts


Creates 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
POST
https://www.wixapis.com/blog/v3/bulk/draft-posts/create

Body Params
draftPostsArray <DraftPost>RequiredminItems 1maxItems 20

Draft posts to create.


publishboolean

Whether the draft post should be published after creation.


returnFullEntityboolean

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


fieldsetsArray <string>maxItems 10

List of draft post fields to be included in the response if the entities are present. Base default fieldset returns all core draft post properties (all properties that are not a supported fieldset value). For example, when URL fieldset is selected, returned draft post will include the set of base properties and the draft post's preview url.

Response Object
resultsArray <BulkDraftPostResult>

Draft posts created by bulk action.


bulkActionMetadataBulkActionMetadata

Bulk action metadata.

Bulk Create Draft Posts Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/blog/v3/bulk/draft-posts/create' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "draftPosts": [ { "title": "Hello, world!", "featured": true, "categoryIds": ["10a5d26e-5028-4f74-92be-e5163c06b58b"], "memberId": "8a8b9b73-4da8-47a5-8268-4396e68a0605", "hashtags": ["world"], "commentingEnabled": true, "tagIds": ["191dcdb7-9319-456d-9a66-eba05ef87bb7"], "relatedPostIds": ["07f89894-5ce2-4736-9793-b36ec4719d96"], "language": "en", "richContent": { "nodes": [ { "type": "PARAGRAPH", "id": "pvirv1", "nodes": [ { "type": "TEXT", "id": "", "nodes": [], "textData": { "text": "Hello world", "decorations": [] } } ], "paragraphData": {} } ] }, { "title": "Hello to you too!", "featured": true, "categoryIds": ["10a5d26e-5028-4f74-92be-e5163c06b58b"], "memberId": "8a8b9b73-4da8-47a5-8268-4396e68a0605", "hashtags": ["world"], "commentingEnabled": true, "tagIds": ["191dcdb7-9319-456d-9a66-eba05ef87bb7"], "relatedPostIds": ["07f89894-5ce2-4736-9793-b36ec4719d96"], "language": "en", "richContent": { "nodes": [ { "type": "PARAGRAPH", "id": "pvirv1", "nodes": [ { "type": "TEXT", "id": "", "nodes": [], "textData": { "text": "Hello to you too", "decorations": [] } } ], "paragraphData": {} } ] } ] "fieldsets": ["URL", "RICH_CONTENT"], "returnFullEntity": false }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "996cb649-d428-405d-b9ed-4facd46e2443", "originalIndex": 0, "success": true }, "itemMetadata": { "id": "eafce080-980c-4462-8943-6dc6ce7e0fff", "originalIndex": 0, "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?