Skip to main content
Skip to navigation

Developer API (2.0.0)

Download OpenAPI specification:Download

Paywall Publishing

Part of the REST API v2 Reference. More Paywall endpoints: Paywall, Paywall Fonts & Media.

Operations about paywalls.

Endpoints

Attach an offering to a paywall

Attach an offering to a paywall so the paywall is served for that offering. This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Request Body schema: application/json
required
offering_id
required
string [ 1 .. 255 ] characters

ID of the offering to attach to the paywall.

Responses

Request samples

Content type
application/json
{
  • "offering_id": "ofrnge1a2b3c4d5"
}

Response samples

Content type
application/json
{
  • "object": "paywall",
  • "id": "pw123456789abcdef",
  • "name": "My Awesome Paywall",
  • "offering_id": "ofrng123456789a",
  • "created_at": 1658399423658,
  • "published_at": 1658399423958,
  • "automatically_scale_font_size": true,
  • "revision": 3,
  • "offering": {
    },
  • "components": {
    }
}

Detach the offering from a paywall

Detach the offering from a paywall. The paywall must be unpublished first. This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Responses

Response samples

Content type
application/json
{
  • "object": "paywall",
  • "id": "pw123456789abcdef",
  • "name": "My Awesome Paywall",
  • "offering_id": "ofrng123456789a",
  • "created_at": 1658399423658,
  • "published_at": 1658399423958,
  • "automatically_scale_font_size": true,
  • "revision": 3,
  • "offering": {
    },
  • "components": {
    }
}

Duplicate a paywall

Duplicate an existing paywall into a new, unpublished paywall in the same project. By default the current draft is duplicated; set source_version to published to duplicate the currently published version instead. By default the duplicated paywall is not attached to an offering; provide an offering to also duplicate the source paywall's offering (packages only) and attach the new paywall to it. This endpoint requires the following permission(s): project_configuration:offerings:read_write, project_configuration:packages:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Request Body schema: application/json
name
string [ 1 .. 255 ] characters

Optional name for the duplicated paywall. Defaults to the original paywall's name with a "Copy" suffix.

source_version
string
Default: "draft"
Enum: "draft" "published"

Which version of the source paywall to duplicate: the current draft (default) or the currently published version. The duplicate is always created as an unpublished draft. Fails with a conflict if published is requested and the paywall is not currently published.

object

Optional. When provided, the source paywall's offering is duplicated (packages only, without its own checkout config or paywall) and the duplicated paywall is attached to it. Omit to leave the duplicated paywall detached from any offering. Fails with a conflict if the source paywall is not associated with an offering.

lookup_key
required
string [ 1 .. 200 ] characters

The custom identifier of the duplicated offering

display_name
required
string [ 1 .. 1500 ] characters

The display name of the duplicated offering

Responses

Request samples

Content type
application/json
{
  • "name": "Main Paywall Copy",
  • "source_version": "published",
  • "offering": {
    }
}

Response samples

Content type
application/json
{
  • "object": "paywall",
  • "id": "pw123456789abcdef",
  • "name": "My Awesome Paywall",
  • "offering_id": "ofrng123456789a",
  • "created_at": 1658399423658,
  • "published_at": 1658399423958,
  • "automatically_scale_font_size": true,
  • "revision": 3,
  • "offering": {
    },
  • "components": {
    }
}

Publish a paywall

Publish the current paywall draft so RevenueCat SDKs can serve it to customers. This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Responses

Response samples

Content type
application/json
{
  • "object": "paywall",
  • "id": "pw123456789abcdef",
  • "name": "My Awesome Paywall",
  • "offering_id": "ofrng123456789a",
  • "created_at": 1658399423658,
  • "published_at": 1658399423958,
  • "automatically_scale_font_size": true,
  • "revision": 3,
  • "offering": {
    },
  • "components": {
    }
}

Unpublish a paywall

Unpublish the current paywall so RevenueCat SDKs stop serving it to customers. This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Responses

Response samples

Content type
application/json
{
  • "object": "paywall",
  • "id": "pw123456789abcdef",
  • "name": "My Awesome Paywall",
  • "offering_id": "ofrng123456789a",
  • "created_at": 1658399423658,
  • "published_at": 1658399423958,
  • "automatically_scale_font_size": true,
  • "revision": 3,
  • "offering": {
    },
  • "components": {
    }
}

Create a paywall version

This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

Request Body schema: application/json
required
name
required
string [ 1 .. 255 ] characters

A human-readable name for the paywall version snapshot.

Responses

Request samples

Content type
application/json
{
  • "name": "V2 Orange Accents"
}

Response samples

Content type
application/json
{
  • "object": "paywall_version",
  • "id": "pwv123456789abcdef",
  • "name": "Before AI edit",
  • "revision": 3,
  • "created_at": 1658399423658,
  • "components_config": {
    },
  • "components_localizations": {
    },
  • "default_locale": "en_US",
  • "automatically_scale_font_size": true,
  • "exit_offers": {
    },
  • "state_declarations": {
    },
  • "play_store_product_change_mode": {
    }
}

Get a paywall version

This endpoint requires the following permission(s): project_configuration:offerings:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

paywall_id
required
string [ 1 .. 255 ] characters
Example: pwXXXXXXXXXXXXXX

ID of the paywall

version_id
required
string [ 1 .. 255 ] characters
Example: pwv123456789abcdef

The id of the paywall version.

Responses

Response samples

Content type
application/json
{
  • "object": "paywall_version",
  • "id": "pwv123456789abcdef",
  • "name": "Before AI edit",
  • "revision": 3,
  • "created_at": 1658399423658,
  • "components_config": {
    },
  • "components_localizations": {
    },
  • "default_locale": "en_US",
  • "automatically_scale_font_size": true,
  • "exit_offers": {
    },
  • "state_declarations": {
    },
  • "play_store_product_change_mode": {
    }
}

Endpoint Reference

All API v2 resources, one page each. General concepts (authentication, pagination, rate limits, error handling) live on the API v2 overview.