Create a paywall on a product.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Overview
Create a paywall on a product. The request takes the same fields and validation as the paywall form in the dashboard, and the paywall shows in the dashboard once created.
Required fields
auto_trigger, target_all, newsletter_enabled, social_registration and the titles of each step are always required. Other fields become required depending on these:
| When | Also required |
|---|---|
auto_trigger is true | frequency_limit, interval_in_days, meter_title, meter_subtitle |
newsletter_enabled is true | newsletter_extra_visits, newsletter_title, newsletter_subtitle |
target_all is false | countries_list, platforms_list, target_adblock |
referrer_values is sent | referrer_operator |
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.
When target_all is true, countries_list, platforms_list and the Referrer rule are ignored, target_adblock is set to true and custom_javascript is cleared.
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.
| Operator | Matches readers who |
|---|---|
any | Removes the rule |
is_any_of | Came from one of these sites. The site must match exactly: google.com does not match www.google.com |
is_none_of | Did not come from any of these sites, including readers with no referrer |
contains | Came from an address that contains one of the values |
does_not_contain | Came from an address that contains none of the values |
matches_pattern | Came from an address that fits one of the patterns. * stands for any text |
is_empty | Have no referrer. Takes no values |
is_not_empty | Have 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.
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.

