info:
  title: Developer API
  version: 2.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
openapi: 3.0.3
tags:
  - name: Paywall
    description: Operations about paywalls.
paths:
  /projects/{project_id}/fonts:
    get:
      summary: Get a list of fonts
      operationId: list-fonts
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          description: >-
            Pagination cursor. Pass the id of the last item from the previous
            page to fetch the next page; omit for the first page.
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of items to return per page. Values below 1 or above
            100 are clamped to that range rather than rejected.
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFonts'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read</code>. This endpoint belongs
        to the <strong>Project Configuration</strong> domain, which has a
        default rate limit of <strong>60 requests per minute</strong>.
    post:
      summary: Upload a font
      operationId: create-font
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - filename
                - content_type
                - file_data_base64
              properties:
                filename:
                  description: >-
                    File name for the uploaded font. Must have a .ttf or .otf
                    extension.
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: GoodSans-Bold.ttf
                content_type:
                  description: MIME type for the uploaded font.
                  type: string
                  enum:
                    - font/ttf
                    - font/otf
                  example: font/ttf
                file_data_base64:
                  description: Base64-encoded font bytes.
                  type: string
                  minLength: 1
                  maxLength: 6990508
                  example: AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAaVsyKAAABHA
      responses:
        '201':
          description: Success. The font was uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Font'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/media_assets:
    get:
      summary: Get a list of media assets
      operationId: list-media-assets
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: starting_after
          in: query
          required: false
          description: >-
            Pagination cursor. Pass the id of the last item from the previous
            page to fetch the next page; omit for the first page.
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of items to return per page. Values below 1 or above
            100 are clamped to that range rather than rejected.
          schema:
            type: integer
            example: 10
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMediaAssets'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read</code>. This endpoint belongs
        to the <strong>Project Configuration</strong> domain, which has a
        default rate limit of <strong>60 requests per minute</strong>.
    post:
      summary: Upload a media asset
      operationId: create-media-asset
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - filename
                - content_type
                - file_data_base64
              properties:
                filename:
                  description: File name for the uploaded image.
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: hero.webp
                content_type:
                  description: MIME type for the uploaded image.
                  type: string
                  enum:
                    - image/jpeg
                    - image/png
                    - image/avif
                    - image/heic
                    - image/heif
                    - image/webp
                  example: image/webp
                file_data_base64:
                  description: Base64-encoded image bytes.
                  type: string
                  minLength: 1
                  maxLength: 2796204
                  example: UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA
      responses:
        '201':
          description: Success. The media asset was uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaAsset'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/paywalls/{paywall_id}/actions/duplicate:
    post:
      summary: Duplicate a paywall
      operationId: duplicate-paywall
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: paywall_id
          description: ID of the paywall
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pwXXXXXXXXXXXXXX
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  description: >-
                    Optional name for the duplicated paywall. Defaults to the
                    original paywall's name with a "Copy" suffix.
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: Main Paywall Copy
                offering:
                  description: >-
                    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.
                  type: object
                  required:
                    - lookup_key
                    - display_name
                  properties:
                    lookup_key:
                      description: The custom identifier of the duplicated offering
                      type: string
                      minLength: 1
                      maxLength: 200
                      example: default
                    display_name:
                      description: The display name of the duplicated offering
                      type: string
                      minLength: 1
                      maxLength: 1500
                      example: The standard set of packages
                  additionalProperties: false
      responses:
        '201':
          description: Success. The paywall was duplicated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paywall'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        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):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/paywalls/{paywall_id}/actions/publish:
    post:
      summary: Publish a paywall
      operationId: publish-paywall
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: paywall_id
          description: ID of the paywall
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pwXXXXXXXXXXXXXX
      responses:
        '200':
          description: Success. The paywall draft was published.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paywall'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        Publish the current paywall draft so RevenueCat SDKs can serve it to
        customers. This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/paywalls/{paywall_id}/actions/unpublish:
    post:
      summary: Unpublish a paywall
      operationId: unpublish-paywall
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: paywall_id
          description: ID of the paywall
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pwXXXXXXXXXXXXXX
      responses:
        '200':
          description: Success. The paywall was unpublished.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paywall'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        Unpublish the current paywall so RevenueCat SDKs stop serving it to
        customers. This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/paywalls/{paywall_id}/versions:
    post:
      summary: Create a paywall version
      operationId: create-paywall-version
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read_write
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: paywall_id
          description: ID of the paywall
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pwXXXXXXXXXXXXXX
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - name
              properties:
                name:
                  description: A human-readable name for the paywall version snapshot.
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: V2 Orange Accents
      responses:
        '201':
          description: Success. The paywall version was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaywallVersion'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/paywalls/{paywall_id}/versions/{version_id}:
    get:
      summary: Get a paywall version
      operationId: get-paywall-version
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:offerings:read
      x-release-status: public
      tags:
        - Paywall
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: paywall_id
          description: ID of the paywall
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: pwXXXXXXXXXXXXXX
        - name: version_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
          description: The id of the paywall version.
          example: pwv123456789abcdef
      responses:
        '200':
          description: Success. The paywall version was returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaywallVersion'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:offerings:read</code>. This endpoint belongs
        to the <strong>Project Configuration</strong> domain, which has a
        default rate limit of <strong>60 requests per minute</strong>.
components:
  schemas:
    ListFonts:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: FontList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Font'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's fonts. If not present /
            null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/fonts?starting_after=font123456789abcdef
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/fonts
      additionalProperties: false
    Font:
      type: object
      required:
        - object
        - id
        - name
        - family_name
        - style
        - weight
        - url
        - font_key
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - font
          type: string
          example: font
        id:
          description: The ID of the font.
          type: string
          minLength: 1
          maxLength: 255
          example: font123456789abcdef
        name:
          description: The PostScript name of the font.
          type: string
          minLength: 1
          maxLength: 255
          example: GoodSans-Bold
        family_name:
          description: The font family name.
          type: string
          minLength: 1
          maxLength: 255
          example: Good Sans
        style:
          description: The font style.
          type: string
          enum:
            - normal
            - italic
          example: normal
        weight:
          description: The font weight.
          type: integer
          example: 700
        url:
          description: The URL where the font file is hosted.
          type: string
          minLength: 1
          maxLength: 5000
          example: https://fonts.revenuecat.com/1_abc123_def456.ttf
        font_key:
          description: The key that identifies this font in a paywall's components config.
          type: string
          minLength: 1
          maxLength: 1000
          example: RCFM:1_font123456789abcdef:GoodSans-Bold
      additionalProperties: false
    ListMediaAssets:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: MediaAssetList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/MediaAsset'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's media assets. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/media_assets?starting_after=mediaasset123456789abcdef
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/media_assets
      additionalProperties: false
    MediaAsset:
      type: object
      required:
        - object
        - id
        - object_name
        - original_name
        - original_size
        - original_width
        - original_height
        - formats
        - alt_text
        - is_decorative
        - asset_base_url
        - asset_type
        - video_metadata
        - transcoding_status
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - media_asset
          type: string
          example: media_asset
        id:
          description: The ID of the media asset.
          type: string
          minLength: 1
          maxLength: 255
          example: mediaasset123456789abcdef
        object_name:
          description: The storage object name for the original asset.
          type: string
          minLength: 1
          maxLength: 5000
          example: paywalls/originals/abc123.webp
        original_name:
          description: The uploaded file name.
          type: string
          minLength: 1
          maxLength: 5000
          example: hero.webp
        original_size:
          description: The original file size in kilobytes.
          type: integer
          format: int64
          example: 12345
        original_width:
          description: The original image width in pixels.
          type: integer
          nullable: true
          example: 1024
        original_height:
          description: The original image height in pixels.
          type: integer
          nullable: true
          example: 1024
        formats:
          description: Rendered image formats keyed by format name.
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/MediaAssetFormat'
        alt_text:
          description: Alt text for the asset.
          type: string
          nullable: true
          maxLength: 1500
          example: A dog looking at a phone
        is_decorative:
          description: Whether this asset is decorative.
          type: boolean
          example: false
        asset_base_url:
          description: The base URL where asset object names can be resolved.
          type: string
          nullable: true
          maxLength: 5000
          example: https://paywalls-assets.revenuecat.com
        asset_type:
          description: The media asset type.
          type: string
          enum:
            - image
            - video
          example: image
        video_metadata:
          description: Video metadata, if this is a video asset.
          type: object
          nullable: true
          additionalProperties: true
        transcoding_status:
          description: The video transcoding status, if this is a video asset.
          type: string
          nullable: true
          example: null
      additionalProperties: false
    Paywall:
      type: object
      required:
        - id
        - name
        - offering_id
        - created_at
        - published_at
        - automatically_scale_font_size
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - paywall
          type: string
        id:
          description: The id of the paywall
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: pw123456789abcdef
        name:
          description: The name of the paywall
          nullable: true
          type: string
          minLength: 1
          maxLength: 255
          example: My Awesome Paywall
        offering_id:
          description: The ID of the offering the paywall is for.
          nullable: true
          type: string
          minLength: 1
          maxLength: 255
          example: ofrng123456789a
        created_at:
          description: The date the paywall was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        published_at:
          description: The date the paywall was published at in ms since epoch
          nullable: true
          type: integer
          format: int64
          example: 1658399423958
        automatically_scale_font_size:
          description: Whether font sizes should automatically scale for this paywall.
          nullable: false
          type: boolean
          default: true
          example: true
        offering:
          description: The offering associated with this paywall. Expandable.
          nullable: true
          $ref: '#/components/schemas/Offering'
        components:
          description: >-
            Published and draft components configurations for this paywall.
            Expandable.
          nullable: true
          $ref: '#/components/schemas/PaywallComponents'
      additionalProperties: false
    PaywallVersion:
      type: object
      required:
        - id
        - name
        - revision
        - created_at
        - components_config
        - components_localizations
        - default_locale
        - automatically_scale_font_size
        - exit_offers
        - state_declarations
        - play_store_product_change_mode
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - paywall_version
          type: string
        id:
          description: The id of the paywall version.
          type: string
          minLength: 1
          maxLength: 255
          example: pwv123456789abcdef
        name:
          description: The name of the paywall version.
          type: string
          minLength: 1
          maxLength: 255
          example: Before AI edit
        revision:
          description: The paywall revision captured by this version.
          type: integer
          example: 3
        created_at:
          description: The date the paywall version was created at in ms since epoch.
          type: integer
          format: int64
          example: 1658399423658
        components_config:
          description: The raw paywall components configuration captured by this version.
          type: object
          nullable: true
          additionalProperties: true
          example:
            base:
              stack:
                id: main_stack
                type: stack
                components: []
        components_localizations:
          description: Localized component values keyed by locale.
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties: true
          example:
            en_US:
              title: Premium
        default_locale:
          description: The default locale captured by this version.
          type: string
          nullable: true
          example: en_US
        automatically_scale_font_size:
          description: >-
            Whether font sizes should automatically scale for this paywall
            version.
          type: boolean
          example: true
        exit_offers:
          description: Exit offer configuration captured by this version.
          type: object
          nullable: true
          additionalProperties: true
          example:
            dismiss:
              offering_id: ofrng123456789abcdef
        state_declarations:
          description: State declarations captured by this version.
          type: object
          nullable: true
          additionalProperties: true
          example:
            selectedPackage:
              type: string
              default: monthly
        play_store_product_change_mode:
          description: >-
            Play Store product change mode configuration captured by this
            version.
          type: object
          nullable: true
          additionalProperties: true
          example:
            upgrade_replacement_mode: deferred
      additionalProperties: true
    Error:
      type: object
      required:
        - type
        - message
        - retryable
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - error
          type: string
          example: error
        type:
          description: The error type
          type: string
          nullable: false
          enum:
            - parameter_error
            - resource_already_exists
            - resource_missing
            - idempotency_error
            - rate_limit_error
            - authentication_error
            - authorization_error
            - store_error
            - server_error
            - resource_locked_error
            - unprocessable_entity_error
            - invalid_request
            - entity_references_archived_entities
          example: parameter_error
        param:
          description: >-
            If the error is parameter-specific, the parameter related to the
            error
          type: string
          nullable: true
          example: customer_id
        doc_url:
          description: A URL to more information about the error reported
          type: string
          nullable: false
          example: https://errors.rev.cat/parameter-error
        message:
          type: string
          description: A message describing the reason of the error
          nullable: false
          example: id shouldn't be longer than 1,500 characters
        retryable:
          description: Indicates if the error is retryable or not
          type: boolean
          nullable: false
          example: false
        backoff_ms:
          description: >-
            The ms the client should wait before retrying the request. Only
            present for retryable errors.
          type: integer
          nullable: true
          example: null
        referenced_object_ids:
          description: >-
            The IDs of related objects relevant to the error, such as the
            archived entities that need to be made active before the operation
            can succeed.
          type: array
          items:
            type: string
          example:
            - prodabcd1234
            - prodwxyz5678
      additionalProperties: false
    MediaAssetFormat:
      type: object
      required:
        - object
        - object_name
        - size
        - width
        - height
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - media_asset_format
          type: string
          example: media_asset_format
        object_name:
          description: The storage object name for this rendered asset format.
          type: string
          minLength: 1
          maxLength: 5000
          example: paywalls/abc123.webp
        size:
          description: The file size in kilobytes.
          type: integer
          format: int64
          example: 12345
        width:
          description: The image width in pixels.
          type: integer
          nullable: true
          example: 1024
        height:
          description: The image height in pixels.
          type: integer
          nullable: true
          example: 1024
      additionalProperties: false
    Offering:
      type: object
      required:
        - id
        - lookup_key
        - display_name
        - is_current
        - state
        - created_at
        - project_id
        - object
        - paywall_id
      properties:
        state:
          description: >-
            Whether the offering is active or inactive (archived). Inactive
            offerings are not returned by the SDK.
          nullable: false
          type: string
          enum:
            - active
            - inactive
          example: active
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - offering
          type: string
        id:
          description: The id of the offering
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: ofrnge1a2b3c4d5
        lookup_key:
          description: A custom identifier of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 200
          example: default
        display_name:
          description: The display name of the offering
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: The standard set of packages
        is_current:
          description: Indicates if the offering is the current offering
          nullable: false
          type: boolean
          example: true
        created_at:
          description: The date the offering was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        project_id:
          description: ID of the project to which the offering belongs
          nullable: false
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        paywall_id:
          description: >-
            ID of the v2-visible paywall attached to this offering, or null if
            none.
          nullable: true
          type: string
          minLength: 1
          maxLength: 255
          example: pw12345abcde
        metadata:
          description: Custom metadata of the offering
          nullable: true
          $ref: '#/components/schemas/OfferingMetadata'
        packages:
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: PackageList
          type: object
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Details about each object.
              items:
                $ref: '#/components/schemas/Package'
              type: array
            next_page:
              description: >-
                URL to access the next page of the Offering's packages. If not
                present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages
      additionalProperties: false
    PaywallComponents:
      type: object
      required:
        - published
        - draft
      properties:
        published:
          description: >-
            The currently published version of the paywall. Null if the paywall
            has never been published.
          nullable: true
          $ref: '#/components/schemas/PaywallComponentsVersion'
        draft:
          description: >-
            The draft version of the paywall if there are unpublished changes.
            Null if there are no unpublished changes.
          nullable: true
          $ref: '#/components/schemas/PaywallComponentsVersion'
      additionalProperties: false
    OfferingMetadata:
      description: Custom metadata of the offering
      type: object
      nullable: true
      additionalProperties: true
      example:
        color: blue
        call_to_action: Subscribe Now!
    Package:
      type: object
      required:
        - id
        - lookup_key
        - display_name
        - position
        - created_at
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - package
          type: string
        id:
          description: The id of the package
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: pkge1a2b3c4d5
        lookup_key:
          description: The lookup_key of the package
          nullable: false
          example: monthly
          type: string
          minLength: 1
          maxLength: 200
        display_name:
          description: The display name of the package
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: Monthly discounted with 3-day trial
        position:
          description: The position of the package within the offering
          nullable: true
          type: integer
          example: 1
        created_at:
          description: The date the package was created at in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        products:
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: ProductList
          properties:
            object:
              description: >-
                String representing the object's type. Objects of the same type
                share the same value. Always has the value `list`.
              enum:
                - list
              type: string
            items:
              description: Product association
              items:
                $ref: '#/components/schemas/PackageProductAssociation'
              type: array
            next_page:
              description: >-
                URL to access the next page of the project's products. If not
                present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: >-
                /v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products
      additionalProperties: false
    PaywallComponentsVersion:
      description: >-
        A specific version (published or draft) of a paywall's components
        configuration.
      type: object
      nullable: true
      required:
        - revision
        - components_config
        - default_locale
        - components_localizations
        - automatically_scale_font_size
      properties:
        revision:
          description: The revision number of this version.
          type: integer
          nullable: true
          example: 1
        components_config:
          description: >-
            The raw, schemaless JSON payload for paywall components
            configuration.
          type: object
          nullable: true
          additionalProperties: true
          example:
            base:
              stack:
                id: l7Ylx2UZeA
                type: stack
                components:
                  - id: LFVZUCf9yW
                    type: text
                    text_lid: OBUxLwsvXb
              sticky_footer:
                id: UJJRRPzRuz
                type: footer
        default_locale:
          description: The default locale for the paywall.
          type: string
          nullable: true
          example: en_US
        components_localizations:
          description: Localized values keyed by locale code.
          type: object
          additionalProperties:
            type: object
            additionalProperties: true
          example:
            en_US:
              title: Premium
        automatically_scale_font_size:
          description: Whether font sizes should automatically scale for this paywall.
          type: boolean
          default: true
          example: true
        fonts:
          description: >-
            Font objects used by the published paywall components. Only present
            on published versions.
          type: object
          nullable: true
          additionalProperties: true
          example:
            CustomFont:
              src: https://example.com/font.ttf
      additionalProperties: false
    PackageProductAssociation:
      type: object
      required:
        - product
        - eligibility_criteria
      properties:
        product:
          $ref: '#/components/schemas/Product'
          nullable: false
        eligibility_criteria:
          $ref: '#/components/schemas/EligibilityCriteria'
          nullable: false
      additionalProperties: true
    Product:
      type: object
      required:
        - id
        - store_identifier
        - type
        - state
        - created_at
        - app_id
        - object
        - display_name
      properties:
        state:
          description: Whether the product is active or inactive (archived).
          nullable: false
          type: string
          enum:
            - active
            - inactive
          example: active
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - product
          type: string
        id:
          description: The id of the product
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: prod1a2b3c4d5e
        store_identifier:
          description: The store product identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: rc_1w_199
        type:
          description: The product type
          nullable: false
          $ref: '#/components/schemas/ProductType'
        subscription:
          description: The subscription product object
          nullable: true
          $ref: '#/components/schemas/SubscriptionProduct'
        one_time:
          description: The one time product object
          nullable: true
          $ref: '#/components/schemas/OneTimeProduct'
        created_at:
          description: The date when the product was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        app_id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        app:
          description: The app associated with the product
          nullable: true
          $ref: '#/components/schemas/App'
        indicative_price:
          description: >-
            The product's indicative price in the default currency/country (USD
            / US). Null if no price is available. Only present when expanded.
          nullable: true
          $ref: '#/components/schemas/IndicativePrice'
        display_name:
          description: The display name of the product
          nullable: true
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium Monthly 2023
      additionalProperties: false
    EligibilityCriteria:
      type: string
      nullable: false
      enum:
        - all
        - google_sdk_lt_6
        - google_sdk_ge_6
    ProductType:
      type: string
      nullable: false
      enum:
        - subscription
        - one_time
        - consumable
        - non_consumable
        - non_renewing_subscription
    SubscriptionProduct:
      type: object
      required:
        - duration
        - grace_period_duration
        - trial_duration
      nullable: true
      properties:
        duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription in ISO-8601 standard
          example: P1M
        grace_period_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's grace period in ISO-8601 standard
          example: P3D
        trial_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's trial period in ISO-8601 standard
          example: P1W
      additionalProperties: true
    OneTimeProduct:
      type: object
      required:
        - is_consumable
      nullable: true
      properties:
        is_consumable:
          type: boolean
          nullable: true
          description: Indicates whether the product is consumable or not.
          example: true
      additionalProperties: true
    App:
      oneOf:
        - $ref: '#/components/schemas/AmazonApp'
        - $ref: '#/components/schemas/AppStoreApp'
        - $ref: '#/components/schemas/MacAppStoreApp'
        - $ref: '#/components/schemas/PlayStoreApp'
        - $ref: '#/components/schemas/StripeApp'
        - $ref: '#/components/schemas/RCBillingApp'
        - $ref: '#/components/schemas/RokuApp'
        - $ref: '#/components/schemas/PaddleApp'
        - $ref: '#/components/schemas/TestStoreApp'
      discriminator:
        propertyName: type
        mapping:
          amazon: '#/components/schemas/AmazonApp'
          app_store: '#/components/schemas/AppStoreApp'
          mac_app_store: '#/components/schemas/MacAppStoreApp'
          play_store: '#/components/schemas/PlayStoreApp'
          stripe: '#/components/schemas/StripeApp'
          rc_billing: '#/components/schemas/RCBillingApp'
          roku: '#/components/schemas/RokuApp'
          paddle: '#/components/schemas/PaddleApp'
          test_store: '#/components/schemas/TestStoreApp'
    IndicativePrice:
      type: object
      nullable: true
      description: >-
        An indicative price for a product, in the default currency/country (USD
        / US). Uses the same price source as the get-offering-prices endpoint.
      required:
        - object
        - currency
        - country
        - amount_micros
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          type: string
          enum:
            - indicative_price
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        amount_micros:
          $ref: '#/components/schemas/AmountMicros'
      additionalProperties: false
    AmazonApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - amazon
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - amazon
          example: amazon
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        amazon:
          description: Amazon type details
          type: object
          required:
            - package_name
          nullable: false
          additionalProperties: true
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
      additionalProperties: true
    AppStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - app_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - app_store
          example: app_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        app_store:
          description: App Store type details
          type: object
          required:
            - bundle_id
            - app_store_connect_api_key_configured
            - subscription_key_configured
          nullable: false
          additionalProperties: true
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            app_store_connect_api_key_configured:
              description: Whether App Store Connect API key credentials are configured.
              type: boolean
              nullable: false
              example: true
            subscription_key_configured:
              description: >-
                Whether In-App Purchase subscription key credentials are
                configured.
              type: boolean
              nullable: false
              example: true
            app_store_connect_vendor_number:
              description: >-
                Your vendor number from App Store Connect, or null when not
                configured.
              type: string
              nullable: true
              minLength: 1
              maxLength: 20
              example: '81234567'
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    MacAppStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - mac_app_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - mac_app_store
          example: mac_app_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        mac_app_store:
          description: Legacy Mac App Store type details
          type: object
          required:
            - bundle_id
          nullable: false
          additionalProperties: true
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    PlayStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - play_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - play_store
          example: play_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        play_store:
          description: Play Store type details
          type: object
          required:
            - package_name
          nullable: false
          additionalProperties: true
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    StripeApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - stripe
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - stripe
          example: stripe
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        stripe:
          description: Stripe type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
      additionalProperties: true
    RCBillingApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - rc_billing
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - rc_billing
          example: rc_billing
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        rc_billing:
          description: Revenue Cat Billing Store type details
          type: object
          required:
            - seller_company_name
            - default_currency
          nullable: false
          additionalProperties: true
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
            seller_company_name:
              description: >-
                The company name. This field is deprecated. Please, use
                `app_name` instead.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
              deprecated: true
            app_name:
              description: Shown in checkout, emails, and receipts sent to customers.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            seller_company_support_email:
              description: >-
                The company support email. This field is deprecated. Please, use
                `support_email` instead.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
              deprecated: true
            support_email:
              description: >-
                Used as the `reply to` address in all emails sent to customers,
                to allow them to receive support.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
            default_currency:
              description: The default currency to be used for the app.
              $ref: '#/components/schemas/RCBillingCurrency'
      additionalProperties: true
    RokuApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - roku
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - roku
          example: roku
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        roku:
          description: Roku Channel Store type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            roku_channel_id:
              description: Channel ID provided on the Roku Channel page.
              type: string
              nullable: true
              minLength: 6
              maxLength: 6
            roku_channel_name:
              description: Channel name that is displayed on the Roku Channel page.
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
      additionalProperties: true
    PaddleApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - paddle
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - paddle
          example: paddle
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        paddle:
          description: Paddle Billing type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            paddle_is_sandbox:
              description: Whether the app is tied to the sandbox environment.
              nullable: false
              type: boolean
              example: true
            paddle_api_key:
              description: Paddle Server-side API key provided on the Paddle dashboard.
              type: string
              nullable: true
              minLength: 50
              maxLength: 70
      additionalProperties: true
    TestStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - test_store
          example: test_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
      additionalProperties: true
    Currency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTC
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWL
    Country:
      type: string
      nullable: true
      example: US
      description: The country that the object is associated with, in ISO alpha 2 code
      enum:
        - null
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CD
        - CG
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - CI
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - MK
        - RO
        - RU
        - RW
        - RE
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
    AmountMicros:
      description: The price in micros. For example, USD 1 would be represented as 1000000
      nullable: false
      type: integer
      example: For 99.99, the value should be 99990000
    RCBillingCurrency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - USD
        - EUR
        - JPY
        - GBP
        - AUD
        - CAD
        - BRL
        - KRW
        - CNY
        - MXN
        - SEK
        - PLN
        - MYR
        - PHP
        - CHF
        - SAR
        - TWD
        - NOK
        - DKK
        - THB
        - NZD
        - SGD
        - HKD
        - CZK
        - AED
        - CLP
        - COP
        - CRC
        - GEL
        - HUF
        - IDR
        - ILS
        - IQD
        - JOD
        - KES
        - KZT
        - MAD
        - PEN
        - QAR
        - RON
        - RSD
        - TZS
        - VND
        - ZAR
        - TRY
        - UAH
  headers:
    RateLimitCurrentUsage:
      required: true
      description: >-
        The current number of requests used for the current limit (including the
        current request).
      schema:
        type: integer
      example: 25
    RateLimitCurrentLimit:
      required: true
      description: The rate limit for this endpoint, expressed in requests per minute.
      schema:
        type: integer
      example: 30
    RateLimitRetryAfter:
      required: true
      description: >-
        The number of seconds to wait before retrying a rate limited
        request.Only present when a request is rate limited.
      schema:
        type: integer
      example: 10
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - parameter_error
                      - invalid_request
          examples:
            parameter_error:
              value:
                object: error
                type: parameter_error
                param: customer_id
                message: id is too long
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Content-Type not application/json
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authentication_error
            example:
              object: error
              type: authentication_error
              message: Invalid API key
              retryable: false
              doc_url: https://errors.rev.cat/authentication-error
    Forbidden:
      description: Access denied
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authorization_error
            example:
              object: error
              type: authorization_error
              message: You're not authorized to access this resource
              retryable: false
              doc_url: https://errors.rev.cat/authorization-error
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_missing
            example:
              object: error
              type: resource_missing
              message: Resource not found
              retryable: false
              doc_url: https://errors.rev.cat/resource-missing
    Locked:
      description: Locked
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_locked_error
            example:
              object: error
              type: resource_locked_error
              message: The resource is currently being modified by a concurrent request
              retryable: true
              doc_url: https://errors.rev.cat/resource-locked-error
              backoff_ms: 1000
    RateLimited:
      description: >-
        The request could not be completed because the rate limiting domain for
        this endpoint is currently at its limit for this project.
      headers:
        RevenueCat-Rate-Limit-Current-Usage:
          $ref: '#/components/headers/RateLimitCurrentUsage'
        RevenueCat-Rate-Limit-Current-Limit:
          $ref: '#/components/headers/RateLimitCurrentLimit'
        Retry-After:
          $ref: '#/components/headers/RateLimitRetryAfter'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - rate_limit_error
            example:
              object: error
              type: rate_limit_error
              message: Rate limit exceeded
              retryable: true
              doc_url: https://errors.rev.cat/rate-limit-error
              backoff_ms: 1000
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - server_error
            example:
              object: error
              type: server_error
              message: There was an internal server error
              retryable: true
              doc_url: https://errors.rev.cat/server-error
              backoff_ms: 1000
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_already_exists
                      - idempotency_error
                      - invalid_request
          examples:
            resource_already_exists:
              value:
                object: error
                type: resource_already_exists
                message: Name is already taken
                retryable: false
                doc_url: https://errors.rev.cat/resource-already-exists
            idempotency_error:
              value:
                object: error
                type: idempotency_error
                message: Idempotency key already used for a different request
                retryable: false
                doc_url: https://errors.rev.cat/idempotency-error
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Request conflicts with the current resource state
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    UnprocessableEntity:
      description: Unprocessable entity
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - unprocessable_entity_error
                      - parameter_error
                      - store_error
                      - entity_references_archived_entities
          examples:
            unprocessable_entity:
              value:
                object: error
                type: unprocessable_entity_error
                message: Cannot delete a product that has purchases
                retryable: false
                doc_url: https://errors.rev.cat/unprocessable-entity-error
            parameter_error:
              value:
                object: error
                type: parameter_error
                message: Date must in the future
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            store_error:
              value:
                object: error
                type: store_error
                message: There was a problem on the App Store
                retryable: true
                doc_url: https://errors.rev.cat/store-error
                backoff_ms: 1000
            entity_references_archived_entities:
              value:
                object: error
                type: entity_references_archived_entities
                message: >-
                  This offering references inactive products. You will need to
                  make the products active first before making the offering
                  active.
                retryable: false
                doc_url: https://errors.rev.cat/entity-references-archived-entities
                referenced_object_ids:
                  - prodabcd1234
                  - prodwxyz5678
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
