> ## Documentation Index
> Fetch the complete documentation index at: https://docs.winwinkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or Update User

> Create or update a user if already exists.



## OpenAPI

````yaml post /users
openapi: 3.0.0
info:
  title: WinWinKit API
  description: An API for interacting with WinWinKit.
  version: '1.0'
  contact:
    name: WinWinKit
    url: https://winwinkit.com
    email: support@winwinkit.com
servers:
  - url: https://api.winwinkit.com
    description: Production
security: []
tags:
  - name: Users
    description: User endpoints
  - name: Claim Actions
    description: Claim actions endpoints
  - name: Rewards Actions
    description: Rewards actions endpoints
paths:
  /users:
    post:
      tags:
        - Users
      summary: Create or Update User
      description: Create or update a user if already exists.
      operationId: createOrUpdateUser
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: The API key to authenticate with.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateRequest'
      responses:
        '200':
          description: The user has been successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '201':
          description: The user has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
components:
  schemas:
    UserCreateRequest:
      type: object
      properties:
        app_user_id:
          type: string
          nullable: false
          example: 821fae4b5-1a2d-4c1e-9152-5297086a161c
          description: The unique identifier of the referral user in your app.
        is_trial:
          type: boolean
          nullable: true
          example: false
          description: Whether the user is a trial user.
        is_premium:
          type: boolean
          nullable: true
          example: false
          description: Whether the user is a premium user.
        first_seen_at:
          format: date-time
          type: string
          nullable: true
          example: '2024-11-10T10:28:18.104Z'
          description: The date when the user was first seen at.
        last_seen_at:
          format: date-time
          type: string
          nullable: true
          deprecated: true
          example: null
          description: >-
            The date when the user was last seen at. Deprecated and will be
            removed in the future.
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the user.
        stripe_customer_id:
          type: string
          nullable: true
          example: cus_1234567890
          description: The unique identifier of the user in Stripe.
      required:
        - app_user_id
    UserResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UserResponseData'
      required:
        - data
    ErrorsResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      description: Errors Response
      required:
        - errors
    UserResponseData:
      type: object
      properties:
        user:
          description: The user
          allOf:
            - $ref: '#/components/schemas/User'
      required:
        - user
    ErrorObject:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        source:
          type: string
          nullable: true
      description: Error Object
      required:
        - code
        - status
        - message
        - source
    User:
      type: object
      properties:
        app_user_id:
          type: string
          example: 821fae4b5-1a2d-4c1e-9152-5297086a161c
          description: The unique identifier of the user in your app.
        referral_code:
          type: string
          example: XYZ123
          nullable: true
          description: The referral code of the user.
        referral_code_link:
          type: string
          nullable: true
          example: https://appname.wwk.link/XYZ123
          description: The referral code link of the user.
        is_trial:
          type: boolean
          nullable: true
          example: false
          description: Whether the user is a trial user.
        is_premium:
          type: boolean
          nullable: true
          example: false
          description: Whether the user is a premium user.
        first_seen_at:
          format: date-time
          type: string
          nullable: true
          example: '2024-11-10T10:28:18.104Z'
          description: The date when the user was first seen at.
        last_seen_at:
          format: date-time
          type: string
          nullable: true
          deprecated: true
          example: null
          description: >-
            The date when the user was last seen at. Deprecated, always returns
            null and will be removed in the future.
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the user.
        stripe_customer_id:
          type: string
          nullable: true
          example: cus_1234567890
          description: The unique identifier of the user in Stripe.
        claim_code_eligibility:
          description: The claim code eligibility of the user.
          allOf:
            - $ref: '#/components/schemas/UserClaimCodeEligibility'
        referred_by:
          nullable: true
          description: The referred by object of the user.
          allOf:
            - $ref: '#/components/schemas/UserReferredBy'
        stats:
          description: The stats of the user.
          allOf:
            - $ref: '#/components/schemas/UserStats'
        rewards:
          description: The rewards of the user.
          allOf:
            - $ref: '#/components/schemas/UserRewards'
        referral_program:
          nullable: true
          description: The program of the user.
          allOf:
            - $ref: '#/components/schemas/ReferralProgram'
      required:
        - app_user_id
        - referral_code
        - referral_code_link
        - is_trial
        - is_premium
        - first_seen_at
        - last_seen_at
        - metadata
        - stripe_customer_id
        - claim_code_eligibility
        - referred_by
        - stats
        - rewards
        - referral_program
    UserClaimCodeEligibility:
      type: object
      properties:
        eligible:
          type: boolean
          example: true
          description: The claim code eligibility flag.
        eligible_until:
          format: date-time
          type: string
          nullable: true
          example: '2024-11-10T10:28:18.104Z'
          description: The claim code eligibility until date.
      description: User's eligibility to claim referral code.
      required:
        - eligible
        - eligible_until
    UserReferredBy:
      type: object
      properties:
        code:
          type: string
          example: XYZ123
          nullable: true
          description: >-
            The code claimed by the user. Can be null if the code's entity has
            been deleted.
        type:
          type: string
          enum:
            - affiliate
            - promo
            - referral
          example: referral
          description: >-
            The type of the code. Can be one of "affiliate", "promo", or
            "referral".
      description: The referred by of the user.
      required:
        - code
        - type
    UserStats:
      type: object
      properties:
        claims:
          type: integer
          example: 0
          description: The number of users who have claimed the referral code.
        conversions:
          type: integer
          example: 0
          description: The number of users who have converted to premium.
        churns:
          type: integer
          example: 0
          description: The number of users who have churned.
      description: The stats of the user.
      required:
        - claims
        - conversions
        - churns
    UserRewards:
      type: object
      properties:
        active:
          description: The referral user active rewards
          allOf:
            - $ref: '#/components/schemas/UserRewardsActive'
        expired:
          description: The referral user expired rewards
          allOf:
            - $ref: '#/components/schemas/UserRewardsExpired'
      required:
        - active
        - expired
    ReferralProgram:
      type: object
      properties:
        id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
          description: The program id
        name:
          type: string
          example: 'Referral Program #1'
          description: The program name
        description:
          type: string
          nullable: true
          example: This is a referral program
          description: The program description
        metadata:
          type: object
          nullable: true
          example: {}
          description: The program metadata
        distribution_percentage:
          type: integer
          example: 100
          description: The program distribution percentage
        limit:
          type: integer
          example: 0
          description: The program limit
        rewards:
          description: The program rewards
          allOf:
            - $ref: '#/components/schemas/ReferralProgramRewards'
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The program created at
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The program updated at
      required:
        - id
        - name
        - description
        - metadata
        - distribution_percentage
        - limit
        - rewards
        - created_at
        - updated_at
    UserRewardsActive:
      type: object
      properties:
        basic:
          description: The referral user basic rewards
          type: array
          items:
            $ref: '#/components/schemas/UserBasicRewardActive'
        credit:
          description: The referral user credit rewards
          type: array
          items:
            $ref: '#/components/schemas/UserCreditRewardActive'
        offer_code:
          description: The referral user offer code rewards
          type: array
          items:
            $ref: '#/components/schemas/UserOfferCodeRewardActive'
        googleplay_promo_code:
          description: The referral user Google Play promo code rewards
          type: array
          items:
            $ref: '#/components/schemas/UserGooglePlayPromoCodeRewardActive'
        revenuecat_entitlement:
          description: The referral user RevenueCat entitlement rewards
          type: array
          items:
            $ref: '#/components/schemas/UserRevenueCatEntitlementRewardActive'
        revenuecat_offering:
          description: The referral user RevenueCat offering rewards
          type: array
          items:
            $ref: '#/components/schemas/UserRevenueCatOfferingRewardActive'
      required:
        - basic
        - credit
        - offer_code
        - googleplay_promo_code
        - revenuecat_entitlement
        - revenuecat_offering
    UserRewardsExpired:
      type: object
      properties:
        basic:
          description: The referral user basic rewards
          type: array
          items:
            $ref: '#/components/schemas/UserBasicRewardExpired'
        credit:
          description: The referral user credit rewards
          type: array
          items:
            $ref: '#/components/schemas/UserCreditRewardExpired'
        offer_code:
          description: The referral user offer code rewards
          type: array
          items:
            $ref: '#/components/schemas/UserOfferCodeRewardExpired'
        googleplay_promo_code:
          description: The referral user Google Play promo code rewards
          type: array
          items:
            $ref: '#/components/schemas/UserGooglePlayPromoCodeRewardExpired'
        revenuecat_entitlement:
          description: The referral user RevenueCat entitlement rewards
          type: array
          items:
            $ref: '#/components/schemas/UserRevenueCatEntitlementRewardExpired'
        revenuecat_offering:
          description: The referral user RevenueCat offering rewards
          type: array
          items:
            $ref: '#/components/schemas/UserRevenueCatOfferingRewardExpired'
      required:
        - basic
        - credit
        - offer_code
        - googleplay_promo_code
        - revenuecat_entitlement
        - revenuecat_offering
    ReferralProgramRewards:
      type: object
      properties:
        sender:
          description: The program sender rewards
          allOf:
            - $ref: '#/components/schemas/ReferralProgramSenderRewards'
        receiver:
          description: The program receiver rewards
          allOf:
            - $ref: '#/components/schemas/ReferralProgramReceiverRewards'
      required:
        - sender
        - receiver
    UserBasicRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/BasicReward'
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expires_at
        - created_at
        - updated_at
    UserCreditRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/CreditReward'
        credits:
          type: integer
          example: 100
          description: The amount of the reward
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - credits
        - expires_at
        - created_at
        - updated_at
    UserOfferCodeRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/OfferCodeReward'
        value:
          nullable: true
          description: The offer code value
          allOf:
            - $ref: '#/components/schemas/OfferCodeValue'
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - value
        - expires_at
        - created_at
        - updated_at
    UserGooglePlayPromoCodeRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/GooglePlayPromoCodeReward'
        value:
          nullable: true
          description: The promo code value
          allOf:
            - $ref: '#/components/schemas/GooglePlayPromoCodeValue'
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - value
        - expires_at
        - created_at
        - updated_at
    UserRevenueCatEntitlementRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatEntitlementReward'
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expires_at
        - created_at
        - updated_at
    UserRevenueCatOfferingRewardActive:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatOfferingReward'
        expires_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expires_at
        - created_at
        - updated_at
    UserBasicRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/BasicReward'
        expired_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    UserCreditRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/CreditReward'
        expired_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    UserOfferCodeRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/OfferCodeReward'
        expired_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    UserGooglePlayPromoCodeRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/GooglePlayPromoCodeReward'
        expired_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    UserRevenueCatEntitlementRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatEntitlementReward'
        expired_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    UserRevenueCatOfferingRewardExpired:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatOfferingReward'
        expired_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The expiration date of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - reward
        - expired_at
        - created_at
        - updated_at
    ReferralProgramSenderRewards:
      type: object
      properties:
        basic:
          description: The program basic rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramSenderBasicReward'
        credit:
          description: The program credit rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramSenderCreditReward'
        offer_code:
          description: The program offer code rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramSenderOfferCodeReward'
        googleplay_promo_code:
          description: The program Google Play promo code rewards
          type: array
          items:
            $ref: >-
              #/components/schemas/ReferralProgramSenderGooglePlayPromoCodeReward
        revenuecat_entitlement:
          description: The program RevenueCat entitlement rewards
          type: array
          items:
            $ref: >-
              #/components/schemas/ReferralProgramSenderRevenueCatEntitlementReward
        revenuecat_offering:
          description: The program RevenueCat offering rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramSenderRevenueCatOfferingReward'
      required:
        - basic
        - credit
        - offer_code
        - googleplay_promo_code
        - revenuecat_entitlement
        - revenuecat_offering
    ReferralProgramReceiverRewards:
      type: object
      properties:
        basic:
          description: The program basic rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramReceiverBasicReward'
        credit:
          description: The program credit rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramReceiverCreditReward'
        offer_code:
          description: The program offer code rewards
          type: array
          items:
            $ref: '#/components/schemas/ReferralProgramReceiverOfferCodeReward'
        googleplay_promo_code:
          description: The program Google Play promo code rewards
          type: array
          items:
            $ref: >-
              #/components/schemas/ReferralProgramReceiverGooglePlayPromoCodeReward
        revenuecat_entitlement:
          description: The program RevenueCat entitlement rewards
          type: array
          items:
            $ref: >-
              #/components/schemas/ReferralProgramReceiverRevenueCatEntitlementReward
        revenuecat_offering:
          description: The program RevenueCat offering rewards
          type: array
          items:
            $ref: >-
              #/components/schemas/ReferralProgramReceiverRevenueCatOfferingReward
      required:
        - basic
        - credit
        - offer_code
        - googleplay_promo_code
        - revenuecat_entitlement
        - revenuecat_offering
    BasicReward:
      type: object
      properties:
        key:
          type: string
          description: The key of the reward
          example: basic-reward
        name:
          type: string
          description: The name of the reward
          example: Basic Reward
        description:
          type: string
          nullable: true
          example: This is a basic reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - name
        - description
        - metadata
        - created_at
        - updated_at
    CreditReward:
      type: object
      properties:
        key:
          type: string
          example: credit-reward
          description: The key of the reward
        credits:
          type: integer
          example: 100
          description: The credits of the reward
        name:
          type: string
          example: Credit Reward
          description: The name of the reward
        description:
          type: string
          nullable: true
          example: This is a credit reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - credits
        - name
        - description
        - metadata
        - created_at
        - updated_at
    OfferCodeReward:
      type: object
      properties:
        key:
          type: string
          example: offer-code-reward
          description: The key of the reward
        offer_code_id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
          description: The offer code id
        offer_code_ref_name:
          type: string
          example: Free Month
          description: The offer code reference name that is set in the App Store Connect
        subscription_product_id:
          type: string
          example: com.winwinkit.monthly
          description: The subscription product id of the offer code
        name:
          type: string
          example: Offer Code Reward
          description: The name of the reward
        description:
          type: string
          nullable: true
          example: This is an offer code reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - offer_code_id
        - offer_code_ref_name
        - subscription_product_id
        - name
        - description
        - metadata
        - created_at
        - updated_at
    OfferCodeValue:
      type: object
      properties:
        value:
          type: string
          example: ABCDEFGHIJKLMNOPQR
          description: The offer code value
        link:
          type: string
          example: >-
            https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR
          description: The offer code redeem link
        expires_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The offer code value expiration date
      required:
        - value
        - link
        - expires_at
    GooglePlayPromoCodeReward:
      type: object
      properties:
        key:
          type: string
          example: promo-code-reward
          description: The key of the reward
        name:
          type: string
          example: Promo Code Reward
          description: The name of the reward
        description:
          type: string
          nullable: true
          example: This is a promo code reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - name
        - description
        - metadata
        - created_at
        - updated_at
    GooglePlayPromoCodeValue:
      type: object
      properties:
        value:
          type: string
          example: ABCDEFGHIJKLMNOPQR
          description: The promo code value
        expires_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The promo code value expiration date
      required:
        - value
        - expires_at
    RevenueCatEntitlementReward:
      type: object
      properties:
        key:
          type: string
          description: The key of the reward
          example: premium-entitlement
        entitlement_id:
          type: string
          description: The entitlement ID of the reward
          example: entl1234567890
        entitlement_key:
          type: string
          description: The entitlement key of the reward
          example: premium
        name:
          type: string
          description: The name of the reward
          example: Premium Access
        description:
          type: string
          nullable: true
          example: This is an RevenueCat entitlement reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - entitlement_id
        - entitlement_key
        - name
        - description
        - metadata
        - created_at
        - updated_at
    RevenueCatOfferingReward:
      type: object
      properties:
        key:
          type: string
          description: The key of the reward
          example: discounted-offering
        offering_id:
          type: string
          description: The offering ID of the reward
          example: ofrng1234567890
        offering_key:
          type: string
          description: The offering key of the reward
          example: discounted
        name:
          type: string
          description: The name of the reward
          example: Discounted Offering
        description:
          type: string
          nullable: true
          example: This is an RevenueCat offering reward
          description: The description of the reward
        metadata:
          type: object
          nullable: true
          example: {}
          description: The metadata of the reward
        created_at:
          format: date-time
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: The created at of the reward
        updated_at:
          format: date-time
          type: string
          nullable: true
          example: '2021-01-01T00:00:00.000Z'
          description: The updated at of the reward
      required:
        - key
        - offering_id
        - offering_key
        - name
        - description
        - metadata
        - created_at
        - updated_at
    ReferralProgramSenderBasicReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/BasicReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: '#/components/schemas/ReferralProgramSenderBasicRewardActivation'
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderBasicRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderBasicRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderCreditReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/CreditReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: '#/components/schemas/ReferralProgramSenderCreditRewardActivation'
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderCreditRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderCreditRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderOfferCodeReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/OfferCodeReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderOfferCodeRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderOfferCodeRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderOfferCodeRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderGooglePlayPromoCodeReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/GooglePlayPromoCodeReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderGooglePlayPromoCodeRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderGooglePlayPromoCodeRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderGooglePlayPromoCodeRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderRevenueCatEntitlementReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatEntitlementReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatEntitlementRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatEntitlementRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatEntitlementRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderRevenueCatOfferingReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatOfferingReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatOfferingRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatOfferingRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramSenderRevenueCatOfferingRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverBasicReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/BasicReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverBasicRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverBasicRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverBasicRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverCreditReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/CreditReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverCreditRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverCreditRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverCreditRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverOfferCodeReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/OfferCodeReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverOfferCodeRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverOfferCodeRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverOfferCodeRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverGooglePlayPromoCodeReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/GooglePlayPromoCodeReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverGooglePlayPromoCodeRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverGooglePlayPromoCodeRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverGooglePlayPromoCodeRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverRevenueCatEntitlementReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatEntitlementReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatEntitlementRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatEntitlementRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatEntitlementRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramReceiverRevenueCatOfferingReward:
      type: object
      properties:
        reward:
          description: The reward
          allOf:
            - $ref: '#/components/schemas/RevenueCatOfferingReward'
        activation:
          description: The activation configuration
          allOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatOfferingRewardActivation
        deactivation:
          oneOf:
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatOfferingRewardNeverDeactivation
            - $ref: >-
                #/components/schemas/ReferralProgramReceiverRevenueCatOfferingRewardIntervalDeactivation
          example:
            variant: never
          description: The deactivation configuration
      required:
        - reward
        - activation
        - deactivation
    ReferralProgramSenderBasicRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
      required:
        - variant
        - amount
    ReferralProgramSenderBasicRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderBasicRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramSenderCreditRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
        limit:
          type: integer
          example: 1
          description: The limit of the activation configuration
      required:
        - variant
        - amount
        - limit
    ReferralProgramSenderCreditRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderCreditRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramSenderOfferCodeRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
        limit:
          type: integer
          example: 1
          description: The limit of the activation configuration
      required:
        - variant
        - amount
        - limit
    ReferralProgramSenderOfferCodeRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderOfferCodeRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramSenderGooglePlayPromoCodeRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
        limit:
          type: integer
          example: 1
          description: The limit of the activation configuration
      required:
        - variant
        - amount
        - limit
    ReferralProgramSenderGooglePlayPromoCodeRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderGooglePlayPromoCodeRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramSenderRevenueCatEntitlementRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
      required:
        - variant
        - amount
    ReferralProgramSenderRevenueCatEntitlementRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderRevenueCatEntitlementRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramSenderRevenueCatOfferingRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
        amount:
          type: integer
          example: 1
          description: The amount of the activation configuration
      required:
        - variant
        - amount
    ReferralProgramSenderRevenueCatOfferingRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramSenderRevenueCatOfferingRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverBasicRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverBasicRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverBasicRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverCreditRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverCreditRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverCreditRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverOfferCodeRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverOfferCodeRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverOfferCodeRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverGooglePlayPromoCodeRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverGooglePlayPromoCodeRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverGooglePlayPromoCodeRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverRevenueCatEntitlementRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
            - conversion
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverRevenueCatEntitlementRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverRevenueCatEntitlementRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period
    ReferralProgramReceiverRevenueCatOfferingRewardActivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - claim
          example: claim
          description: The variant of the activation configuration
      required:
        - variant
    ReferralProgramReceiverRevenueCatOfferingRewardNeverDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - never
          example: never
          description: The variant of the deactivation configuration
      required:
        - variant
    ReferralProgramReceiverRevenueCatOfferingRewardIntervalDeactivation:
      type: object
      properties:
        variant:
          type: string
          enum:
            - interval
          example: interval
          description: The variant of the deactivation configuration
        duration:
          type: integer
          example: 1
          description: The duration of the deactivation configuration
        period:
          type: string
          enum:
            - days
            - months
            - years
          example: days
          description: The period of the deactivation configuration
      required:
        - variant
        - duration
        - period

````