Update paywall

Update a paywall of a product. Fields left out keep their saved values.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Update a paywall of a product. All fields are optional: fields left out keep their saved values, and the request is then validated with the same rules as the paywall form in the dashboard. The paywall must belong to the product in the path, otherwise the request returns 404.

Targeting

When target_all is false, countries_list, platforms_list and target_adblock are required. countries_list and platforms_list take Pelcro country and platform IDs, and the response returns the same IDs.

Sending countries_list or platforms_list replaces the saved list. Switching target_all to true clears the countries, platforms, tags and custom_javascript, sets target_adblock to true and removes the Referrer rule.

Referrer rule

Send referrer_operator and referrer_values to target readers by the site they arrive from, the same rule as the Referrer field in the dashboard.

OperatorMatches readers who
anyRemoves the rule
is_any_ofCame from one of these sites. The site must match exactly: google.com does not match www.google.com
is_none_ofDid not come from any of these sites, including readers with no referrer
containsCame from an address that contains one of the values
does_not_containCame from an address that contains none of the values
matches_patternCame from an address that fits one of the patterns. * stands for any text
is_emptyHave no referrer. Takes no values
is_not_emptyHave a referrer. Takes no values

referrer_values takes up to 50 values of up to 255 characters each, as a list or a comma-separated string. Each value is a domain (facebook.com), a full URL (https://www.facebook.com/) or an Android app (android-app://com.google.android.googlequicksearchbox/). Values cannot contain spaces, and * is only allowed with matches_pattern.

The rule is ignored when target_all is true.

An update without referrer_operator keeps the saved rule.

Rich text

HTML in the step titles and subtitles is sanitized. Only a and p tags are kept, with the href, target and rel attributes.

Image upload

register_image takes a file upload, not a URL. Send the request as multipart/form-data when uploading an image.

Path Params
int32
required

Product ID.

int32
required

Paywall ID.

Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
boolean

Whether the paywall opens on its own once the reader reaches the meter limit. When true, frequency_limit, interval_in_days, meter_title and meter_subtitle are required.

boolean

Whether the paywall targets every reader. When false, countries_list, platforms_list and target_adblock are required. Setting it to true clears the countries, platforms, tags and custom_javascript, sets target_adblock to true and removes the Referrer rule.

boolean

Whether the paywall targets readers using an ad blocker. Required when target_all is false.

countries_list
array of integers

IDs of the countries the paywall targets. Required when target_all is false. Each ID must be a valid Pelcro country ID.

countries_list
platforms_list
array of integers

IDs of the platforms (operating systems and devices) the paywall targets. Required when target_all is false. Each ID must be a valid Pelcro platform ID.

platforms_list
tags
array of strings | null

Page tags the paywall targets. Returned as a comma-separated string.

tags
string
enum
length ≤ 50

Referrer rule: how the reader's referrer is matched against referrer_values. any removes the rule. is_empty and is_not_empty take no values. Required when referrer_values is sent. Ignored when target_all is true.

referrer_values
array of strings
length ≤ 50

Values for the Referrer rule: domains (facebook.com), full URLs (https://www.facebook.com/) or Android apps (android-app://com.google.android.googlequicksearchbox/). A comma-separated string is also accepted. No spaces. * wildcards are only allowed with matches_pattern.

referrer_values
number | null
0 to 100

Subscription likelihood score threshold, from 0 to 100.

boolean

Whether the paywall blocks readers in private (incognito) browsing.

string | null

Global JavaScript variables the paywall targets.

string | null

URL pattern of the pages the paywall targets.

string | null

URL pattern of the pages the paywall excludes.

string | null

Type of paywall.

string | null

Custom JavaScript targeting condition. Cleared when target_all is true.

number | null

Number of free articles before the paywall opens. Required when auto_trigger is true.

number | null

Number of days before the meter resets. Must be greater than 0. Required when auto_trigger is true.

string | null

Meter title. Required when auto_trigger is true.

string | null

Meter subtitle. Required when auto_trigger is true.

string

Meter metadata. A JSON-encoded string.

string
length ≤ 65535

Plan selection title.

string
length ≤ 65535

Plan selection subtitle.

string

Plan selection metadata. A JSON-encoded string.

boolean

Whether the newsletter step is enabled. When true, newsletter_extra_visits, newsletter_title and newsletter_subtitle are required.

number | null

Extra free articles a reader gets for signing up to the newsletter. Required when newsletter_enabled is true.

string | null

Newsletter title. Required when newsletter_enabled is true.

string | null

Newsletter subtitle. Required when newsletter_enabled is true.

string

Newsletter metadata. A JSON-encoded string.

file

Image shown on the registration step. A file upload: send the request as multipart/form-data.

boolean

Whether social sign-in is offered on the registration step.

string
length ≤ 65535

Registration title.

string
length ≤ 65535

Registration subtitle.

string

Registration metadata. A JSON-encoded string.

string
length ≤ 65535

Payment step title.

string
length ≤ 65535

Payment step subtitle.

string

Payment step metadata. A JSON-encoded string.

string
length ≤ 65535

Success step title.

string
length ≤ 65535

Success step content.

string

Success step metadata. A JSON-encoded string.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json