info:
  title: Developer API
  version: 2.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
openapi: 3.0.3
tags:
  - name: App
    description: Operations about apps.
paths:
  /projects/{project_id}/apps/{app_id}/public_api_keys:
    get:
      summary: Get a list of the public API keys of an app
      description: >-
        Returns public API keys for the app. RC Checkout public keys are
        omitted. Sandbox keys are always included. Production keys are omitted
        when the app uses Stripe or Web Billing and the linked Stripe connected
        account is sandbox or test-only (same behavior as the RevenueCat
        dashboard list).
         This endpoint requires the following permission(s): <code>project_configuration:apps: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>.
      operationId: list-app-public-api-keys
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiKeys'
          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'
  /projects/{project_id}/apps:
    get:
      summary: Get a list of apps
      operationId: list-apps
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      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/ListApps'
          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:apps: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: Create an app
      operationId: create-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      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:
              $ref: '#/components/schemas/AppCreate'
              additionalProperties: false
            examples:
              App Store:
                value:
                  name: My App Store App
                  type: app_store
                  app_store:
                    bundle_id: com.apple.Pages
                    shared_secret: 1234567890abcdef1234567890abcdef
                    subscription_private_key: >-
                      -----BEGIN EC PRIVATE KEY-----

                      MHQCAQEEIGAkwOF0qkGO19yJlIzQVcOg+HBfvLL4KDXDtL+MMHk2oAcGBSuBBAAK

                      oUQDQgAEhDP7RaX4c6qOHkE1nIWMr5C90ybtr87VRGFm4VsfWqG47NPN+/dHcfwJ

                      JPZGFgMcgvBc37AxQPPQjyXYjhhQDg==

                      -----END EC PRIVATE KEY-----
                    subscription_key_id: 6345942CC3
                    subscription_key_issuer: 5a049d62-1b9b-453c-b605-1988189d8129
              Play Store:
                value:
                  name: My Play Store App
                  type: play_store
                  play_store:
                    package_name: com.android.app
              Stripe:
                value:
                  name: My Stripe App
                  type: stripe
                  stripe:
                    stripe_account_id: acct_adcdef123456
              Amazon:
                value:
                  name: My Amazon App
                  type: amazon
                  amazon:
                    package_name: com.amazon.android.app
                    shared_secret: <Your Amazon Developer Identity Shared Key>
              Web Billing:
                value:
                  name: My RevenueCat App
                  type: rc_billing
                  rc_billing:
                    app_name: <Your app name>
                    default_currency: USD
              Roku:
                value:
                  name: My Roku App
                  type: roku
                  roku:
                    roku_api_key: <Your Roku Pay API Key goes here>
                    roku_channel_id: 123456
                    roku_channel_name: History Channel
              Paddle:
                value:
                  name: My Paddle App
                  type: paddle
                  paddle:
                    paddle_api_key: <Your Paddle API Key goes here>
      responses:
        '201':
          description: Success. The app was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          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:apps: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}/apps/{app_id}:
    get:
      summary: Get an app
      operationId: get-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          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:apps: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: Update an app
      operationId: update-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The name of the app
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: My App
                  nullable: false
                amazon:
                  description: >-
                    Amazon type details. Should only be used when type is
                    amazon.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    package_name:
                      description: The package name of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: Your Amazon Developer Identity Shared Key
                      type: string
                      nullable: true
                app_store:
                  description: >-
                    App Store type details. Should only be used when type is
                    app_store.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    bundle_id:
                      description: The bundle ID of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: The shared secret of the app
                      type: string
                      minLength: 32
                      maxLength: 32
                      nullable: true
                    subscription_private_key:
                      description: PKCS
                      type: string
                      minLength: 1
                      maxLength: 4500
                    subscription_key_id:
                      description: >-
                        In App Key id. The ID of the downloaded in app key. You
                        can get it from App Store Connect
                      type: string
                      minLength: 1
                      maxLength: 32
                    subscription_key_issuer:
                      description: >-
                        The key Issuer id. See instructions on how to obtain
                        this in
                        https://www.revenuecat.com/docs/in-app-purchase-key-configuration#3-providing-the-issuer-id-to-revenuecat
                      type: string
                      minLength: 1
                      maxLength: 36
                    app_store_connect_api_key:
                      description: >-
                        App Store Connect API Key downloaded from App Store
                        Connect in PEM format. Copy the contents of the file in
                        this field. This is optional and used for advanced
                        features like product imports.
                      type: string
                      minLength: 1
                      maxLength: 4500
                    app_store_connect_api_key_id:
                      description: >-
                        App Store Connect API Key ID. The ID of the downloaded
                        API key. You can get it from App Store Connect.
                      type: string
                      minLength: 1
                      maxLength: 36
                    app_store_connect_api_key_issuer:
                      description: App Store Connect API Key Issuer ID.
                      type: string
                      minLength: 1
                      maxLength: 36
                    app_store_connect_vendor_number:
                      description: >-
                        Your vendor number from App Store Connect. Required for
                        some features like financial reports.
                      type: string
                      minLength: 1
                      maxLength: 20
                mac_app_store:
                  description: >-
                    Legacy Mac App Store type details. Should only be used when
                    type is mac_app_store.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    bundle_id:
                      description: The bundle ID of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                    shared_secret:
                      description: The shared secret of the app
                      type: string
                      minLength: 32
                      maxLength: 32
                      nullable: true
                play_store:
                  description: >-
                    Play Store type details. Should only be used when type is
                    play_store.
                  type: object
                  required:
                    - package_name
                  nullable: false
                  additionalProperties: false
                  properties:
                    package_name:
                      description: The package name of the app
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                stripe:
                  description: >-
                    Stripe type details. Should only be used when type is
                    stripe.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    stripe_account_id:
                      description: >-
                        It needs to be connected to your RevenueCat account. It
                        can be omitted if you only have a single Stripe account
                        connected to your RevenueCat account.
                      type: string
                      minLength: 1
                      maxLength: 256
                      nullable: false
                rc_billing:
                  description: >-
                    Web Billing type details. Should only be used when type is
                    rc_billing.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    stripe_account_id:
                      description: >-
                        It needs to be connected to your RevenueCat account. It
                        can be omitted if you only have a single Stripe account
                        connected to your RevenueCat account.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 256
                    app_name:
                      description: >-
                        Shown in checkout, emails, and receipts sent to
                        customers.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 256
                    support_email:
                      description: >-
                        Used as the `reply to` address in all emails sent to
                        customers, to allow them to receive support. If you
                        leave this field blank, your RevenueCat account email
                        address will be used.
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 320
                    default_currency:
                      $ref: '#/components/schemas/RCBillingCurrency'
                roku:
                  description: >-
                    Roku Channel Store type details. Should only be used when
                    type is roku.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    roku_api_key:
                      description: >-
                        Roku Pay API key provided on the Roku Pay Web Services
                        page.
                      type: string
                      minLength: 33
                      maxLength: 33
                      nullable: true
                    roku_channel_id:
                      description: Channel ID provided on the Roku Channel page.
                      type: string
                      minLength: 6
                      maxLength: 6
                      nullable: true
                    roku_channel_name:
                      description: Channel name that is displayed on the Roku Channel page.
                      type: string
                      minLength: 1
                      maxLength: 30
                      nullable: true
                paddle:
                  description: >-
                    Paddle Billing type details. Should only be used when type
                    is paddle.
                  type: object
                  nullable: false
                  additionalProperties: false
                  properties:
                    paddle_api_key:
                      description: >-
                        Paddle Server-side API key provided on the Paddle
                        dashboard.
                      type: string
                      nullable: true
                      minLength: 50
                      maxLength: 50
                    paddle_is_sandbox:
                      description: Whether the app is tied to the sandbox environment.
                      nullable: false
                      type: boolean
                      example: true
              additionalProperties: false
            examples:
              Update App Store App properties:
                value:
                  name: New App name
                  app_store:
                    bundle_id: com.my.new-app
                    shared_secret: 1234567890abcdef1234567890abcdef
              Update App Store App secret:
                value:
                  app_store:
                    shared_secret: 1234567890abcdef1234567890abcdef
              Remove App Store App secret:
                value:
                  app_store:
                    shared_secret: null
      responses:
        '200':
          description: Success. The app was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
          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'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:apps: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>.
    delete:
      summary: Delete an app
      operationId: delete-app
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read_write
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          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:apps: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}/apps/{app_id}/store_kit_config:
    get:
      summary: Get the StoreKit configuration for an app
      operationId: get-app-storekit-config
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:apps:read
      x-release-status: public
      tags:
        - App
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          description: ID of the app
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: app1ab2c3d4
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreKitConfigFile'
          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:apps: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:
    ListPublicApiKeys:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: PublicApiKeyList
      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/PublicApiKey'
          type: array
        next_page:
          description: >-
            URL to access the next page of the app's public API keys. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/projec1a2b3c4d/apps/app1a2b3c4d/public_api_keys?starting_after=pub1a2b3c4d
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/projec1a2b3c4d/apps/app1a2b3c4d/public_api_keys
      additionalProperties: false
    ListApps:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: AppList
      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/App'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's apps. If not present /
            null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/projec1a2b3c4d/apps?starting_after=app1a2b3c4d
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/projec1a2b3c4d/apps
      additionalProperties: false
    AppCreate:
      oneOf:
        - $ref: '#/components/schemas/AmazonAppCreate'
        - $ref: '#/components/schemas/AppStoreAppCreate'
        - $ref: '#/components/schemas/MacAppStoreAppCreate'
        - $ref: '#/components/schemas/PlayStoreAppCreate'
        - $ref: '#/components/schemas/StripeAppCreate'
        - $ref: '#/components/schemas/RCBillingAppCreate'
        - $ref: '#/components/schemas/RokuAppCreate'
        - $ref: '#/components/schemas/PaddleAppCreate'
      discriminator:
        propertyName: type
        mapping:
          amazon: '#/components/schemas/AmazonAppCreate'
          app_store: '#/components/schemas/AppStoreAppCreate'
          mac_app_store: '#/components/schemas/MacAppStoreAppCreate'
          play_store: '#/components/schemas/PlayStoreAppCreate'
          stripe: '#/components/schemas/StripeAppCreate'
          rc_billing: '#/components/schemas/RCBillingAppCreate'
          roku: '#/components/schemas/RokuAppCreate'
          paddle: '#/components/schemas/PaddleAppCreate'
    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'
    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
    DeletedObject:
      type: object
      required:
        - object
        - id
        - deleted_at
      properties:
        object:
          description: The type of the deleted object
          enum:
            - app
            - chart_annotation
            - customer
            - discount
            - entitlement
            - experiment
            - offering
            - package
            - paywall
            - product
            - virtual_currency
            - webhook_integration
          type: string
        id:
          description: The ID of the deleted object
          nullable: false
          type: string
        deleted_at:
          nullable: false
          type: integer
          format: int64
          description: The date when the object was deleted in ms since epoch
          example: 1658399423658
      additionalProperties: false
    StoreKitConfigFile:
      type: object
      description: Contents of a generated StoreKit config file for an app
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - store_kit_config_file
          type: string
        contents:
          type: object
          description: Contents of the StoreKit config file
          additionalProperties: true
      required:
        - object
        - contents
      additionalProperties: false
    PublicApiKey:
      type: object
      required:
        - id
        - key
        - app_id
        - created_at
        - environment
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - public_api_key
          type: string
        id:
          description: The ID of the public API key
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: apikey12345
        key:
          description: The value of the public API key
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: goog_1ab2c3d4
        environment:
          description: The environment the public API key is for
          nullable: false
          enum:
            - production
            - sandbox
          type: string
        app_id:
          description: The ID of the app the public API key is for
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        created_at:
          description: The date when the public API key was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
      additionalProperties: false
    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
    AmazonAppCreate:
      type: object
      required:
        - name
        - type
        - amazon
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - amazon
          nullable: false
        amazon:
          description: Amazon type details. Should only be used when type is amazon.
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: Your Amazon Developer Identity Shared Key
              type: string
              nullable: false
          additionalProperties: false
      additionalProperties: false
    AppStoreAppCreate:
      type: object
      required:
        - name
        - type
        - app_store
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - app_store
          nullable: false
        app_store:
          description: App Store type details. Should only be used when type is app_store.
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: The shared secret of the app
              type: string
              minLength: 32
              maxLength: 32
              nullable: false
            subscription_private_key:
              description: >
                PKCS /#8 In App Key downloaded from App Store Connect in PEM
                format. Copy the contents

                of the file in this field. See instructions on how to get it
                in: 

                https://www.revenuecat.com/docs/in-app-purchase-key-configuration
              type: string
              minLength: 1
              maxLength: 4500
              nullable: false
            subscription_key_id:
              description: >-
                In App Key id. The ID of the downloaded in app key. You can get
                it from App Store Connect
              type: string
              minLength: 1
              maxLength: 32
              nullable: false
            subscription_key_issuer:
              description: >-
                The key Issuer id. See instructions on how to obtain this in:
                https://www.revenuecat.com/docs/in-app-purchase-key-configuration#3-providing-the-issuer-id-to-revenuecat 
              type: string
              minLength: 1
              maxLength: 36
              nullable: false
            app_store_connect_api_key:
              description: >
                App Store Connect API Key downloaded from App Store Connect in
                PEM format. Copy the contents

                of the file in this field. This is optional and used for
                advanced features like product imports.
              type: string
              minLength: 1
              maxLength: 4500
              nullable: false
            app_store_connect_api_key_id:
              description: >-
                App Store Connect API Key ID. The ID of the downloaded API key.
                You can get it from App Store Connect.
              type: string
              minLength: 1
              maxLength: 36
              nullable: false
            app_store_connect_api_key_issuer:
              description: App Store Connect API Key Issuer ID.
              type: string
              minLength: 1
              maxLength: 36
              nullable: false
            app_store_connect_vendor_number:
              description: >-
                Your vendor number from App Store Connect. Required for some
                features like financial reports.
              type: string
              minLength: 1
              maxLength: 20
              nullable: false
          additionalProperties: false
      additionalProperties: false
    MacAppStoreAppCreate:
      type: object
      required:
        - name
        - type
        - mac_app_store
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - mac_app_store
          nullable: false
        mac_app_store:
          description: >-
            Mac App Store type details. Should only be used when type is
            mac_app_store.
          type: object
          required:
            - bundle_id
          nullable: false
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
            shared_secret:
              description: The shared secret of the app
              type: string
              minLength: 32
              maxLength: 32
              nullable: false
          additionalProperties: false
      additionalProperties: false
    PlayStoreAppCreate:
      type: object
      required:
        - name
        - type
        - play_store
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - play_store
          nullable: false
        play_store:
          description: >-
            Play Store type details. Should only be used when type is
            play_store.
          type: object
          required:
            - package_name
          nullable: false
          properties:
            package_name:
              description: The package name of the app
              type: string
              minLength: 1
              maxLength: 256
              nullable: false
          additionalProperties: false
      additionalProperties: false
    StripeAppCreate:
      type: object
      required:
        - name
        - type
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - stripe
          nullable: false
        stripe:
          description: Stripe type details. Should only be used when type is stripe.
          type: object
          nullable: false
          properties:
            stripe_account_id:
              description: >-
                It needs to be connected to your RevenueCat account. It can be
                omitted if you only have a single Stripe account connected to
                your RevenueCat account.
              type: string
              minLength: 1
              maxLength: 256
              nullable: true
          additionalProperties: false
      additionalProperties: false
    RCBillingAppCreate:
      type: object
      required:
        - name
        - type
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - rc_billing
          nullable: false
        rc_billing:
          description: Revenue Cat Billing Store type details
          type: object
          required:
            - app_name
          nullable: true
          properties:
            stripe_account_id:
              description: >-
                It needs to be connected to your RevenueCat account. It can be
                omitted if you only have a single Stripe account connected to
                your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
            app_name:
              description: Shown in checkout, emails, and receipts sent to customers.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            support_email:
              description: >-
                Used as the `reply to` address in all emails sent to customers,
                to allow them to receive support.  If you leave this field
                blank, your RevenueCat account email address will be used.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
            default_currency:
              $ref: '#/components/schemas/RCBillingCurrency'
          additionalProperties: false
      additionalProperties: false
    RokuAppCreate:
      type: object
      required:
        - name
        - type
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - roku
          nullable: false
        roku:
          description: Roku Channel Store details. Should only be used when type is roku.
          type: object
          nullable: true
          properties:
            roku_api_key:
              description: Roku Pay API key provided on the Roku Pay Web Services page.
              type: string
              nullable: true
              minLength: 33
              maxLength: 33
            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: false
      additionalProperties: false
    PaddleAppCreate:
      type: object
      required:
        - name
        - type
      properties:
        name:
          description: The name of the app
          type: string
          minLength: 1
          maxLength: 255
          nullable: false
        type:
          description: >
            The platform of the app.

            Mac App Store is disabled by default. See [Legacy Mac
            Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more
            details.
          type: string
          enum:
            - paddle
          nullable: false
        paddle:
          description: Paddle Billing details. Should only be used when type is paddle.
          type: object
          nullable: true
          properties:
            paddle_api_key:
              description: Paddle Server-side API key provided on the Paddle dashboard.
              type: string
              nullable: true
              minLength: 50
              maxLength: 70
            paddle_is_sandbox:
              description: |
                [Deprecated] Whether the app is tied to the sandbox environment.
                This field is deprecated and will be removed in the future.
                The environment is determined by the `paddle_api_key` format.
              nullable: true
              type: boolean
              example: true
          additionalProperties: false
      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
  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
    BadGateway:
      description: Bad gateway
      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: Upstream service returned an invalid response
              retryable: true
              doc_url: https://errors.rev.cat/server-error
              backoff_ms: 1000
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
