POST

Create Draft Post


Creates a draft post.

A draft post's memberId is required for 3rd-party apps.

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/draft-posts

Body Params
draftPostDraftPostRequired

Draft post to create.


publishboolean

Whether the draft post should be published on creation.

Default: false


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
draftPostDraftPost

Created draft post info.

Create Draft Post Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/blog/v3/draft-posts/' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "draftPost": { "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": {} } ] } }, "fieldsets": ["URL", "RICH_CONTENT"] }'
Response
JSON
{ "draftPost": { "id": "90216f8c-92a2-42ba-9665-8845358f76c9", "title": "Hello, world!", "featured": true, "categoryIds": ["10a5d26e-5028-4f74-92be-e5163c06b58b"], "memberId": "8a8b9b73-4da8-47a5-8268-4396e68a0605", "hashtags": [], "commentingEnabled": true, "minutesToRead": 1, "tagIds": ["191dcdb7-9319-456d-9a66-eba05ef87bb7"], "relatedPostIds": ["07f89894-5ce2-4736-9793-b36ec4719d96"], "pricingPlanIds": [], "language": "en", "changeOrigin": "MANUAL_SAVE", "contentId": "65e1e91a977e0da0db388ac0", "editingSessionId": "592e30c6-221b-42ce-a778-8a9f4a5fa3f8", "richContent": { "nodes": [ { "type": "PARAGRAPH", "id": "pvirv1", "nodes": [ { "type": "TEXT", "id": "", "nodes": [], "textData": { "text": "Hello world", "decorations": [] } } ], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } } ], "metadata": { "version": 1, "createdTimestamp": "2024-03-01T14:41:30.157Z", "updatedTimestamp": "2024-03-01T14:41:30.157Z", "id": "bb477a63-7190-442b-8709-99783cade048" } }, "status": "UNPUBLISHED", "mostRecentContributorId": "8a8b9b73-4da8-47a5-8268-4396e68a0605", "hasUnpublishedChanges": true, "editedDate": "2024-03-01T14:41:29.991Z", "seoData": { "tags": [] }, "slugs": [], "url": { "base": "https://hello.wixsite.com/blog", "path": "/post/hello-world" }, "createdDate": "2024-03-01T14:41:29.991Z", "media": { "displayed": true, "custom": false }, "translations": [] } }
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?