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:
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.
The following table shows field support for filters and sorting for the Draft Post object:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $hasSome , $not | Sortable |
title | $eq , $ne , $contains , $startsWith , $endsWith , $hasSome , $lt , $lte , $gt , $gte , $exists , $in | Sortable |
excerpt | $eq , $ne , $contains , $startsWith , $endsWith , $hasSome , $lt , $lte , $gt , $gte , $exists , $in | Sortable |
featured | $eq , $ne | Sortable |
categoryIds | $hasSome , $hasAll | |
memberId | $eq , $ne , $hasSome | |
hashtags | $hasSome , $hasAll | |
commentingEnabled | $eq , $ne | Sortable |
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 , $gte | Sortable |
scheduledPublishDate | $lt , $lte , $gt , $gte | Sortable |
Related content: API Query Language, Query Draft Posts
The Draft
object represents the information for blog draft posts.
Draft post ID.
Draft post title.
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.
Whether the draft post is marked as featured.
Category IDs of the draft post.
Draft post owner's member ID.
Hashtags in the post.
Whether commenting on the draft post is enabled.
Estimated reading time of the draft post (calculated automatically).
Image placed at the top of the blog page.
Tag IDs the draft post is tagged with.
IDs of posts related to this draft post.
Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan.
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.
Language the draft post is written in.
2-or-4-letter language code in IETF BCP 47 language tag format.
Reserved for internal use.
Reserved for internal use.
Reserved for internal use.
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).
image
gallery
video
audio
divider
linkButton
html
giphy
codeBlock
file
hashtag
lineSpacing
indent
link
textColor
textHighlight
heading
verticalEmbed
table
collapsibleList
poll
Status of the draft post.
Details of the draft post in review. Only relevant to posts submitted by guest writers.
Reserved for internal use.
Indicates if there are changes made to the draft post that have not yet been published.
Date the draft post was last edited.
Date the draft post is scheduled to be published.
Reserved for internal use.
Date the post was first published.
SEO data.
Reserved for internal use.
Reserved for internal use.
Draft post URL preview. What the URL will look like once the post is published.
Date the draft post was first created.
SEO slug.
Post cover media.
Number of paragraphs to display in a paid content preview for non-paying users.
Reserved for internal use.
{
"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"
}
}
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
.You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post status filter.
If omitted, draft posts with all statuses are returned.
IN_MODERATION
is deprecated, use IN_REVIEW
instead.
Language filter.
2-or-4-letter language code in IETF BCP 47 language tag format. If omitted, draft posts in all languages are returned.
Sort options.
Default: EDITING_DATE_DESCENDING
Number of items to skip in the current sort order.
Default: 0
Number of items to return.
Default:50
Pointer to the next or previous page in the list of results.
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.
List of draft posts.
Details on the paged set of results returned.
curl \
'https://www.wixapis.com/blog/v3/draft-posts' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"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
}
}
Creates a draft post.
A draft post's memberId is required for 3rd-party apps.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post to create.
Whether the draft post should be published on creation.
Default: false
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.
Created draft post info.
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"]
}'
{
"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": []
}
}
Creates multiple draft posts.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft posts to create.
Whether the draft post should be published after creation.
Whether to return the full created draft post entities in the response.
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.
Draft posts created by bulk action.
Bulk action metadata.
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
}'
{
"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
}
}
Updates multiple draft posts.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft posts to update.
Action to perform on the posts.
Default: UPDATE
Posts' scheduled publish date when action
is set to UPDATE_SCHEDULE
.
Whether to return the full updated draft post entities in the response.
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.
Draft posts updated by bulk action.
Bulk action metadata.
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",
}'
{
"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
}
}
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
.You can only call this method when authenticated as a Wix app or Wix user identity.
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.
Sorting options.
Default: EDITING_DATE_DESCENDING
Number of items to skip in the current sort order.
Default: 0
Number of items to return.
Default:50
Pointer to the next or previous page in the list of results.
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.
Draft post ids.
List of draft posts.
Details on the paged set of results returned.
curl \
'https://www.wixapis.com/blog/v3/draft-posts/trash-bin' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"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
}
}
Gets a draft post by the provided ID.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
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.
Draft post info.
curl \
'https://www.wixapis.com/blog/v3/draft-posts/448d1238-0072-4458-a280-bf81c2dd8af1' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"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"
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
Whether to bypass the trash bin and delete the post permanently.
Default: false
curl -X DELETE 'https://www.wixapis.com/blog/v3/draft-posts/0eed85df-8332-4d7b-9184-164a482f0b41' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{}
Updates a draft post.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
Draft post to update.
Action to perform on the post.
Default: UPDATE
Post publish schedule date if action
is set to UPDATE_SCHEDULE
.
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.
Updated draft post info.
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"
}
}'
{
"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"
}
}
Gets a deleted draft post from the trash bin by the provided ID.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
Draft post info.
curl \
'https://www.wixapis.com/blog/v3/draft-posts/trash-bin/448d1238-0072-4458-a280-bf81c2dd8af1' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"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"
}
}
Permanently deletes a draft post that is currently in the trash bin.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
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>' \
{}
Deletes multiple draft posts.
You can only call this method when authenticated as a Wix app or Wix user identity.
Post IDs.
Should delete bypassing the trash-bin.
Bulk action results.
Bulk action metadata.
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,
}'
{
"results": [
{
"itemMetadata": {
"id": "996cb649-d428-405d-b9ed-4facd46e2443",
"originalIndex": 0,
"success": true,
"error": null
},
"item": null
}
],
"bulkActionMetadata": {
"totalSuccesses": 1,
"totalFailures": 0,
"undetailedFailures": 0
}
}
Restores a deleted draft post from the trash bin by the provided ID.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
Restored draft post info.
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>' \
{
"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"
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
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.
Query options.
List of posts.
Deprecated. Use pagingMetadata
instead.
This property will be removed on June 30, 2023.
Details on the paged set of results returned.
Details on the paged set of results returned.
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>'
{
"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
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Draft post ID.
Published post ID.
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>'
{
"postId": "894a58a2-dc75-422d-9ca6-00a489750dfd"
}
Triggered when a draft post is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
Triggered when a draft post is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
Triggered when a draft post is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.blog.v3.draft
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}