Skip to main content

Developer API (2.0.0)

Download OpenAPI specification:Download

Paywall

Operations about paywalls.

Get a list of fonts

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

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/fonts?starting_after=font123456789abcdef",
  • "url": "/v2/projects/proj1ab2c3d4/fonts"
}

Upload a font

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

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

File name for the uploaded font. Must have a .ttf or .otf extension.

content_type
required
string
Enum: "font/ttf" "font/otf"

MIME type for the uploaded font.

file_data_base64
required
string [ 1 .. 6990508 ] characters

Base64-encoded font bytes.

Responses

Request samples

Content type
application/json
{
  • "filename": "GoodSans-Bold.ttf",
  • "content_type": "font/ttf",
  • "file_data_base64": "AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAaVsyKAAABHA"
}

Response samples

Content type
application/json
{
  • "object": "font",
  • "id": "font123456789abcdef",
  • "name": "GoodSans-Bold",
  • "family_name": "Good Sans",
  • "style": "normal",
  • "weight": 700,
  • "font_key": "RCFM:1_font123456789abcdef:GoodSans-Bold"
}

Get a list of media assets

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

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/media_assets?starting_after=mediaasset123456789abcdef",
  • "url": "/v2/projects/proj1ab2c3d4/media_assets"
}

Upload a media asset

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

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

File name for the uploaded image.

content_type
required
string
Enum: "image/jpeg" "image/png" "image/avif" "image/heic" "image/heif" "image/webp"

MIME type for the uploaded image.

file_data_base64
required
string [ 1 .. 2796204 ] characters

Base64-encoded image bytes.

Responses

Request samples

Content type
application/json
{
  • "filename": "hero.webp",
  • "content_type": "image/webp",
  • "file_data_base64": "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"
}

Response samples

Content type
application/json
{
  • "object": "media_asset",
  • "id": "mediaasset123456789abcdef",
  • "object_name": "paywalls/originals/abc123.webp",
  • "original_name": "hero.webp",
  • "original_size": 12345,
  • "original_width": 1024,
  • "original_height": 1024,
  • "formats": {
    },
  • "alt_text": "A dog looking at a phone",
  • "is_decorative": false,
  • "asset_type": "image",
  • "video_metadata": { },
  • "transcoding_status": null
}

Duplicate a paywall

Duplicate an existing paywall's current draft into a new, unpublished paywall in the same project. 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. 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.

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",
  • "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,
  • "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,
  • "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,
  • "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": {
    }
}