About the Blog Paywall API

A paywall is the content a blog shows to visitors who don't have access to a post, typically a short message and a call to action in place of the post body.

The API is built from 2 entities:

  • Paywall template: Reusable paywall content in the site's template library. A template is authored once per language and can be used by any number of posts.
  • Post paywall: The paywall content of a single post. It either references a paywall template from the library, or holds rich content of its own that applies to that post only.

That distinction decides what happens when a template is edited. A post that references a template reflects every later edit to it. A post with content of its own doesn't, because that content is a copy with no further ties to the template it was based on.

With the Blog Paywall API, your app can:

  • Create, update, and delete paywall templates in the site's library.
  • Retrieve library templates by ID, or list them by language.
  • Point a post at a library template, or give the post paywall content of its own.
  • Retrieve the content to show on a post without having to know where it comes from.
  • Retrieve the global default template for a language.

Before you begin

It's important to note the following points before starting to code:

  • A post is identified by both postId and postFqdn, because a draft post and the published post it produces share an ID. postFqdn is wix.blog.v4.draft_post for a draft post and wix.blog.v4.post for a published post, and the 2 have separate post paywalls.
  • Set and delete a post's paywall on the draft post, with postFqdn set to wix.blog.v4.draft_post. When the post is published, the draft post's paywall is copied to the published post. If the draft post has no paywall, the published post's paywall is deleted. Changes made directly to a published post's paywall are overwritten the next time the post is published or updated.
  • A post paywall has either paywallTemplateId or richContent. Setting one clears the other, so replacing a post's own content with a template reference discards that content.
  • Each post has at most 1 post paywall, so Upsert Post Paywall creates or replaces it and you don't need to check whether one already exists.
  • A post with no post paywall shows the global default template for its language. Don't point a post at the default template explicitly. It has the same effect, and the default isn't part of the site's own data. To put a post back on the default, call Delete Post Paywall.
  • Every library template belongs to exactly 1 language. language is set when the template is created and can't be changed afterwards. To offer a paywall in another language, create another template. List Paywall Templates matches the language exactly, so en-US doesn't return templates saved as en.
  • Global default templates aren't part of the site's template library. They aren't returned by List Paywall Templates and can't be updated or deleted. To retrieve one, call Get Default Paywall Template.
  • Deleting a template doesn't update the posts that use it. Those posts show the global default template for their language until you assign them another template.
  • richContent uses the Wix Rich Content (Ricos) format, the same format the blog post editor produces. Paywall content is always a single LAYOUT node whose layoutData.banner.position is PAYWALL. What visitors see is the content of that node's LAYOUT_CELL, typically a heading, a message, and a call-to-action button.
  • List methods return up to 100 items per request. Use cursor paging to retrieve more.

Use cases

Terminology

  • Paywall: The content shown in place of a post body to a visitor without access to the post.
  • Paywall template: Reusable paywall content in the site's library. Editing one updates every post that references it.
  • Post paywall: The paywall content of a single post. Either a reference to a paywall template, or content of the post's own.
  • Post FQDN: Distinguishes a draft post (wix.blog.v4.draft_post) from a published one (wix.blog.v4.post), since they share an ID.
  • Default paywall template: The global template provided for a language, used when a post has no paywall of its own.

Last updated: 4 December 2026

Did this help?