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.
Was this helpful?
Yes
No

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

Was this helpful?
Yes
No

Draft Object

Blog Submodule Docs

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).

heroImageobject
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
Language the draft post is written in. 2-letter language code in ISO 639-1 alpha-2 format.

changeOriginstringRead-only
35 enum supported values:
UNKNOWNADMINADD_CATEGORIESAUTO_SAVECOPY_TEMPLATEIMPORTIMPORT_BULKIMPORT_HTMLIMPORT_PATCHLANGUAGE_CHANGEMANUAL_SAVEMIGRATIONMODERATIONMOVE_TO_TRASHPRICING_PLANS_CHANGEPROVISIONPUBLISHREASSIGN_OWNERREBLOGRESTOREREVERT_TO_DRAFTTRANSLATIONUNPUBLISHUNSCHEDULENEW_EDIT_SESSIONSCHEDULING_SERVICE_SCHEDULESCHEDULING_SERVICE_UNSCHEDULESCHEDULING_SERVICE_PUBLISHSCHEDULEREMOVE_FROM_MODERATIONREJECT_FROM_MODERATIONAPPROVE_IN_MODERATIONDELETE_TAGPINUNPIN
Reserved for internal use.

contentIdstringRead-onlymaxLength 24
Reserved for internal use.

editingSessionIdstringformat GUID
Reserved for internal use.

richContentobject
Draft Post rich content.

statusstringRead-only
7 enum supported values:
UNKNOWNPUBLISHEDUNPUBLISHEDSCHEDULEDDELETEDIN_MODERATIONIN_REVIEW
Status of the draft post.

moderationDetailsobject
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.

seoDataobject
SEO data.

paidContentParagraphintegerdeprecated - use previewTextParagraph insteadminimum 0format int32
Reserved for internal use.

slugsArray <string>Read-onlymaxItems 5000maxLength 100
Reserved for internal use.

urlobjectRead-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.

mediaobject
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.
Was this helpful?
Yes
No

GetList 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/blog//v3/draft-posts

Was this helpful?
Yes
No

PostCreate Draft Post

Creates a draft post.

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/blog//v3/draft-posts

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostBulk Create Draft Posts

Creates multiple draft posts.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Manage Members
Manage Bookings Services and Settings
Read Members and Contacts - all read permissions
Read Members
Manage Members and Contacts - all permissions
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/blog/v3/bulk/draft-posts/create

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PatchBulk Update Draft Posts

Updates multiple draft posts.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Manage Members
Manage Bookings Services and Settings
Read Members and Contacts - all read permissions
Read Members
Manage Members and Contacts - all permissions
Learn more about permission scopes.
Endpoint
PATCH
https://www.wixapis.com/blog//v3/draft-posts/update

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetList 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/blog//v3/draft-posts/trash-bin

Was this helpful?
Yes
No

GetGet Draft Post

Gets a draft post by the provided ID.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/blog//v3/draft-posts/{draftPostId}

Was this helpful?
Yes
No

DeleteDelete 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
DELETE
https://www.wixapis.com/blog//v3/draft-posts/{draftPostId}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PatchUpdate Draft Post

Updates a draft post.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Manage Members
Manage Bookings Services and Settings
Read Members and Contacts - all read permissions
Read Members
Manage Members and Contacts - all permissions
Learn more about permission scopes.
Endpoint
PATCH
https://www.wixapis.com/blog//v3/draft-posts/{draftPost.id}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Deleted Draft Post

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/blog//v3/draft-posts/trash-bin/{draftPostId}

Was this helpful?
Yes
No

DeleteRemove From Trash Bin

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
DELETE
https://www.wixapis.com/blog//v3/draft-posts/trash-bin/{draftPostId}

Was this helpful?
Yes
No

DeleteBulk Delete Draft Posts

Deletes multiple draft posts.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Was this helpful?
Yes
No

PostRestore From Trash Bin

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/blog//v3/draft-posts/trash-bin/{draftPostId}/restore

Was this helpful?
Yes
No

PostQuery 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/blog//v3/draft-posts/query

Was this helpful?
Yes
No

PostPublish 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/blog//v3/draft-posts/{draftPostId}/publish

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

Draft Post Created

Triggered when a draft post is created.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Read Draft Blog Posts
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
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.

createdEventobject
Event information.
Was this helpful?
Yes
No

Draft Post Updated

Triggered when a draft post is updated.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Read Draft Blog Posts
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
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.

updatedEventobject
Event information.
Was this helpful?
Yes
No

Draft Deleted

Triggered when a draft post is deleted.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Blog
Read Draft Blog Posts
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
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.
Was this helpful?
Yes
No