About the Draft Posts API

The Draft Posts API allows users to create and manage draft posts. A draft post is an article written by a site collaborator who is given the appropriate roles and permissions.

With the Draft Posts API, you can:

  • Create and update draft posts.
  • Publish draft posts.
  • Update multiple draft posts.
  • Delete draft posts.
  • Restore deleted draft posts from the trash bin.

With Wix Pricing Plans, exclusive blog content can only be accessed by readers with a subscription. Learn more about creating blog post subscriptions.

Learn more about Wix Blog.

Note: translationId is only returned in the draftPost object if the Multilingual app is installed.

Terminology

  • Post: A published article on a blog site. It is also referred to as a publication. A blog can have up to 100K posts.
  • Draft Post: An article written by a site owner, blog editor, blog writer, or a guest writer that is not yet published.
  • Category: A group of similar and related posts. A post can be assigned to a maximum of 10 categories.
  • Tag: A way to further sort and organize blog posts. Tags provide the ability to filter blog posts.
Did this help?

Draft Posts: Supported Filters and Sorting

The following table shows field support for filters and sorting for the Draft Post object:

FieldSupported FiltersSortable
id$eq, $ne, $hasSome, $notSortable
title$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $inSortable
excerpt$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $inSortable
featured$eq, $neSortable
categoryIds$hasSome, $hasAll
memberId$eq, $ne, $hasSome
hashtags$hasSome, $hasAll
commentingEnabled$eq, $neSortable
minutesToRead$eq, $ne, $lt, $lte, $gt, $gte, $in
tagIds$hasSome, $hasAll
pricingPlanIds$hasSome, $hasAll
translationId$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $in
language$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $in
status$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $in
hasUnpublishedChanges$eq, $ne
editedDate$lt, $lte, $gt, $gteSortable
scheduledPublishDate$lt, $lte, $gt, $gteSortable

Related content: API Query Language, Query Draft Posts

Did this help?

Draft Object


The Draft object represents the information for blog draft posts.

Properties
idstringRead-onlymaxLength 38

Draft post ID.


titlestringmaxLength 200

Draft post title.


excerptstringmaxLength 500

Draft post excerpt.

If no excerpt has been manually set, an excerpt is automatically generated from the post's text. This can be retrieved using the GENERATED_EXCERPT fieldset.


featuredboolean

Whether the draft post is marked as featured.


categoryIdsArray <string>maxItems 10maxLength 38

Category IDs of the draft post.


memberIdstringformat GUID

Draft post owner's member ID.


hashtagsArray <string>maxItems 100maxLength 100

Hashtags in the post.


commentingEnabledboolean

Whether commenting on the draft post is enabled.


minutesToReadintegerRead-only

Estimated reading time of the draft post (calculated automatically).


heroImageHeroImage

Image placed at the top of the blog page.


tagIdsArray <string>maxItems 30maxLength 38

Tag IDs the draft post is tagged with.


relatedPostIdsArray <string>maxItems 3maxLength 38

IDs of posts related to this draft post.


pricingPlanIdsArray <string>maxItems 100format GUID

Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan.


translationIdstringformat GUID

ID of the draft post's translations.

All translations of a single post share the same translationId. Available only if the Multilingual app is installed.


languagestringformat LANGUAGE_TAG

Language the draft post is written in.

2-or-4-letter language code in IETF BCP 47 language tag format.


changeOriginstringRead-only

Reserved for internal use.


contentIdstringRead-onlymaxLength 24

Reserved for internal use.


editingSessionIdstringformat GUID

Reserved for internal use.


richContentRichContent

Draft Post rich content.

This field uses Ricos Document, a structured rich content data format. For a quick start, copy the JSON content from the sample playground below. Learn more about Rich Content (SDK | REST).

{
"nodes": [
{
"id": "foo",
"type": "HEADING",
"nodes": [
{
"id": "",
"type": "TEXT",
"textData": {
"text": "Wix Blog"
}
}
],
"headingData": {
"level": 2,
"textStyle": {
"textAlignment": "AUTO"
}
}
},
{
"id": "lxr936",
"type": "PARAGRAPH"
},
{
"id": "j7tdj13",
"type": "PARAGRAPH",
"nodes": [
{
"id": "",
"type": "TEXT",
"textData": {
"text": "Give your brand a voice and make it stand out with beautiful, up-to-date layouts and customization tools. Raise the conversation around your business with blog posts that matter and make it easy for readers to share your content organically around the web."
}
}
Note: This API enables the following Ricos plugins :
imagegalleryvideoaudiodividerlinkButtonhtmlgiphycodeBlockfilehashtaglineSpacingindentlinktextColortextHighlightheadingverticalEmbedtablecollapsibleListpoll

statusstringRead-only

Status of the draft post.


moderationDetailsModerationDetails

Details of the draft post in review. Only relevant to posts submitted by guest writers.


mostRecentContributorIdstringRead-onlyformat GUID

Reserved for internal use.


hasUnpublishedChangesbooleanRead-only

Indicates if there are changes made to the draft post that have not yet been published.


editedDatestringRead-onlyformat date-time

Date the draft post was last edited.


scheduledPublishDatestringRead-onlyformat date-time

Date the draft post is scheduled to be published.


contentstruct

Reserved for internal use.


firstPublishedDatestringformat date-time

Date the post was first published.


seoDataSeoData

SEO data.


paidContentParagraphintegerdeprecated - use previewTextParagraph insteadminimum 0format int32

Reserved for internal use.


slugsArray <string>Read-onlymaxItems 5000maxLength 100

Reserved for internal use.


urlUrlRead-only

Draft post URL preview. What the URL will look like once the post is published.


createdDatestringRead-onlyformat date-time

Date the draft post was first created.


seoSlugstringmaxLength 100

SEO slug.


mediaMedia

Post cover media.


previewTextParagraphintegerminimum 0format int32

Number of paragraphs to display in a paid content preview for non-paying users.


internalIdstringRead-onlymaxLength 24

Reserved for internal use.

DraftPost
JSON
{ "draftPost": { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Did this help?

GET

List Draft Posts


Retrieves a list of up to 100 draft posts per request.

List Draft Posts runs with these defaults, which you can override:

  • editedDate is sorted in descending order.
  • paging.limit is 50.
  • paging.offset is 0.
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
GET
https://www.wixapis.com/blog/v3/draft-posts

Query Params
statusstring

Draft post status filter.

If omitted, draft posts with all statuses are returned. IN_MODERATION is deprecated, use IN_REVIEW instead.


languagestring

Language filter.

2-or-4-letter language code in IETF BCP 47 language tag format. If omitted, draft posts in all languages are returned.


sortstring

Sort options.

Default: EDITING_DATE_DESCENDING


paging.offsetintegerminimum 0

Number of items to skip in the current sort order.

Default: 0


paging.limitintegerminimum 1maximum 100

Number of items to return.

Default:50


paging.cursorstringmaxLength 2000

Pointer to the next or previous page in the list of results.


fieldsetsArray <string>

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
draftPostsArray <DraftPost>

List of draft posts.


metaDataMetaData

Details on the paged set of results returned.

List Draft Posts Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPosts": [ { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" }, { "id": "0bba372c-7f15-4663-84d2-0fa32f1e1226", "title": "Best restaurants in Rome", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 1, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "621cb0dc226b6a33a2877607", "editingSessionId": "56106223-7307-471f-b280-cec482185962", "richContent": { "nodes": [ { "type": "PARAGRAPH", "id": "foo", "nodes": [ { "type": "TEXT", "id": "", "nodes": [], "textData": { "text": "Introduction", "decorations": [] } } ], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } }, { "type": "PARAGRAPH", "id": "f420g", "nodes": [], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } }, { "type": "PARAGRAPH", "id": "bcbpt", "nodes": [], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } } ], "metadata": { "version": 1, "createdTimestamp": "2022-03-14T11:42:11.250Z", "updatedTimestamp": "2022-03-14T11:42:11.250Z", "id": "27c0e783-d64e-4c6b-a6a2-d1f5163509bb" }, "documentStyle": {} }, "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-02-28T11:24:12.116Z", "content": { "blocks": [ { "key": "foo", "text": "new post", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "f420g", "text": "", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "bcbpt", "text": "", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} } ], "entityMap": {}, "documentStyle": {}, "VERSION": "8.69.22", "ID": "27c0e783-d64e-4c6b-a6a2-d1f5163509bb" }, "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "paidContentParagraph": 1, "slugs": [], "createdDate": "2022-02-28T11:16:01.569Z" } ], "metaData": { "count": 2, "offset": 0, "total": 2 } }
Did this help?

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": [] } }
Event TriggersThis method triggers the following events:
Did this help?

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 } }
Event TriggersThis method triggers the following events:
Did this help?

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 } }
Event TriggersThis method triggers the following events:
Did this help?

GET

List Deleted Draft Posts


Retrieves a list of up to 100 deleted draft posts.

List Draft Posts runs with these defaults, which you can override:

  • editedDate is sorted in descending order. In this case,editedDate implies the date the post was deleted.
  • paging.limit is 50.
  • paging.offset is 0.
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
GET
https://www.wixapis.com/blog/v3/draft-posts/trash-bin

Query Params
languagestring

Language filter.

2-or-4-letter language code in IETF BCP 47 language tag format. If omitted, deleted draft posts in all languages are returned.


sortstring

Sorting options.

Default: EDITING_DATE_DESCENDING


paging.offsetintegerminimum 0

Number of items to skip in the current sort order.

Default: 0


paging.limitintegerminimum 1maximum 100

Number of items to return.

Default:50


paging.cursorstringmaxLength 2000

Pointer to the next or previous page in the list of results.


fieldsetsArray <string>

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.


draftPostIdsArray <string>

Draft post ids.

Response Object
draftPostsArray <DraftPost>

List of draft posts.


metaDataMetaData

Details on the paged set of results returned.

List Deleted Draft Posts Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts/trash-bin' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPosts": [ { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "DELETED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" }, { "id": "0bba372c-7f15-4663-84d2-0fa32f1e1226", "title": "Best restaurants in Rome", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 1, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "621cb0dc226b6a33a2877607", "editingSessionId": "56106223-7307-471f-b280-cec482185962", "richContent": { "nodes": [ { "type": "PARAGRAPH", "id": "foo", "nodes": [ { "type": "TEXT", "id": "", "nodes": [], "textData": { "text": "Introduction", "decorations": [] } } ], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } }, { "type": "PARAGRAPH", "id": "f420g", "nodes": [], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } }, { "type": "PARAGRAPH", "id": "bcbpt", "nodes": [], "paragraphData": { "textStyle": { "textAlignment": "AUTO" }, "indentation": 0 } } ], "metadata": { "version": 1, "createdTimestamp": "2022-03-14T11:42:11.250Z", "updatedTimestamp": "2022-03-14T11:42:11.250Z", "id": "27c0e783-d64e-4c6b-a6a2-d1f5163509bb" }, "documentStyle": {} }, "status": "DELETED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-02-28T11:24:12.116Z", "content": { "blocks": [ { "key": "foo", "text": "new post", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "f420g", "text": "", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "bcbpt", "text": "", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} } ], "entityMap": {}, "documentStyle": {}, "VERSION": "8.69.22", "ID": "27c0e783-d64e-4c6b-a6a2-d1f5163509bb" }, "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "paidContentParagraph": 1, "slugs": [], "createdDate": "2022-02-28T11:16:01.569Z" } ], "metaData": { "count": 2, "offset": 0, "total": 2 } }
Did this help?

GET

Get Draft Post


Gets a draft post by the provided ID.

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
GET
https://www.wixapis.com/blog/v3/draft-posts/{draftPostId}

Path Params
draftPostIdstringRequired

Draft post ID.

Query Params
fieldsetsArray <string>

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

Draft post info.

Get Draft Post Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts/448d1238-0072-4458-a280-bf81c2dd8af1' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPost": { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Did this help?

DELETE

Delete Draft Post


Moves a draft post to the trash bin. A published post can also be deleted by the post ID.

To permanently delete a post bypassing the trash bin, set the permanent field value to true. The post can't be restored after this.

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
DELETE
https://www.wixapis.com/blog/v3/draft-posts/{draftPostId}

Path Params
draftPostIdstringRequired

Draft post ID.

Query Params
permanentboolean

Whether to bypass the trash bin and delete the post permanently.

Default: false

Response Object
Returns an empty object.
Delete Draft Post Example 1
Request
cURL
curl -X DELETE 'https://www.wixapis.com/blog/v3/draft-posts/0eed85df-8332-4d7b-9184-164a482f0b41' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{}
Event TriggersThis method triggers the following events:
Did this help?

PATCH

Update Draft Post


Updates a draft post.

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/{draftPost.id}

Path Params
draftPost.idstringRequired

Draft post ID.

Body Params
draftPostDraftPostRequired

Draft post to update.


actionstring

Action to perform on the post.

Default: UPDATE


scheduledPublishDatestringformat date-time

Post publish schedule date if action is set to UPDATE_SCHEDULE.


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

Updated draft post info.

Update Draft Post Example 1
Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/blog/v3/draft-posts/448d1238-0072-4458-a280-bf81c2dd8af1' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' -d '{ "draftPost": { "title": "Places to visit in Europe" } }'
Response
JSON
{ "draftPost": { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a39", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Event TriggersThis method triggers the following events:
Did this help?

GET

Get Deleted Draft Post


Gets a deleted draft post from the trash bin by the provided ID.

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
GET
https://www.wixapis.com/blog/v3/draft-posts/trash-bin/{draftPostId}

Path Params
draftPostIdstringRequired

Draft post ID.

Response Object
draftPostDraftPost

Draft post info.

Get Deleted Draft Post Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts/trash-bin/448d1238-0072-4458-a280-bf81c2dd8af1' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPost": { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "DELETED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Did this help?

DELETE

Remove From Trash Bin


Permanently deletes a draft post that is currently in the trash bin.

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
DELETE
https://www.wixapis.com/blog/v3/draft-posts/trash-bin/{draftPostId}

Path Params
draftPostIdstringRequired

Draft post ID.

Response Object
Returns an empty object.
Remove From Trash Bin Example 1
Request
cURL
curl -X DELETE \ 'https://www.wixapis.com/blog/v3/draft-posts/trash-bin/996cb649-d428-405d-b9ed-4facd46e2443' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \
Response
JSON
{}
Did this help?

DELETE

Bulk Delete Draft Posts


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

Query Params
postIdsArray <string>Required

Post IDs.


permanentboolean

Should delete bypassing the trash-bin.

Response Object
resultsArray <BulkDraftPostResult>

Bulk action results.


bulkActionMetadataBulkActionMetadata

Bulk action metadata.

Bulk Delete Draft Posts Example 1
Request
cURL
curl -X DELETE \ 'https://www.wixapis.com/blog/v3/bulk/draft-posts' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "postIds": [ "996cb649-d428-405d-b9ed-4facd46e2443" ] "permanent": false, }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "996cb649-d428-405d-b9ed-4facd46e2443", "originalIndex": 0, "success": true, "error": null }, "item": null } ], "bulkActionMetadata": { "totalSuccesses": 1, "totalFailures": 0, "undetailedFailures": 0 } }
Did this help?

POST

Restore From Trash Bin


Restores a deleted draft post from the trash bin by the provided ID.

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/trash-bin/{draftPostId}/restore

Path Params
draftPostIdstringRequired

Draft post ID.

Response Object
draftPostDraftPost

Restored draft post info.

Restore From Trash Bin Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/blog/v3/draft-posts/trash-bin/996cb649-d428-405d-b9ed-4facd46e2443/restore' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \
Response
JSON
{ "draftPost": { "id": "996cb649-d428-405d-b9ed-4facd46e2443", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a39", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Did this help?

POST

Query Draft Posts


Retrieves a list of up to 100 draft posts, given the provided paging, filtering, and sorting.

Query Draft Posts runs with these defaults, which you can override:

  • editedDate is sorted in DESC order.
  • paging.limit is 50.
  • paging.offset is 0.

For field support for filters and sorting, see Field Support for Filtering and Sorting.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

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/query

Body Params
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.


queryQuery

Query options.

Response Object
draftPostsArray <DraftPost>

List of posts.


metaDataMetaDatadeprecated - use pagingMetadata instead

Deprecated. Use pagingMetadata instead. This property will be removed on June 30, 2023.

Details on the paged set of results returned.


pagingMetadataPagingMetadata

Details on the paged set of results returned.

Query Draft Posts Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/draft-posts/query' \ --data-binary '{ "filter": { "title": { "$startsWith": "Places to visit" } } }' \ } -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "draftPosts": [ { "id": "448d1238-0072-4458-a280-bf81c2dd8af1", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } ], "metaData": { "count": 1, "offset": 0, "total": 1 } }
Did this help?

POST

Publish Draft Post


Publishes a specified draft post by ID. This creates a new post entity with the data from the draft post. If the specified draft post was already published, the published post will be updated with the latest values from the draft post entity.

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/{draftPostId}/publish

Path Params
draftPostIdstringRequired

Draft post ID.

Response Object
postIdstringformat GUID

Published post ID.

Publish Draft Post Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/blog/v3/draft-posts/894a58a2-dc75-422d-9ca6-00a489750dfd/publish' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "postId": "894a58a2-dc75-422d-9ca6-00a489750dfd" }
Event TriggersThis method triggers the following events:
Did this help?

Draft Post Created


Triggered when a draft post is created.

Permissions
Manage Blog
Read Draft Blog Posts
Read Blog
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft.


slugstring

Event name. Expected created.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


createdEventCreatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.blog.v3.draft_created", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }
Did this help?

Draft Deleted


Triggered when a draft post is deleted.

Permissions
Manage Blog
Read Draft Blog Posts
Read Blog
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft.


slugstring

Event name. Expected deleted.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


deletedEventstruct

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.blog.v3.draft_deleted", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }
Did this help?

Draft Post Updated


Triggered when a draft post is updated.

Permissions
Manage Blog
Read Draft Blog Posts
Read Blog
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft.


slugstring

Event name. Expected updated.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


updatedEventUpdatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.blog.v3.draft_updated", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }
Did this help?