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

# Update Loyalty Rule

> Update an existing Loyalty Rule



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/loyalty/rules/{id}
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/loyalty/rules/{id}:
    post:
      tags:
        - Loyalty
      summary: Update Loyalty Rule
      description: Update an existing Loyalty Rule
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  title: Name
                  description: Name of the loyalty rule
                  example: Daily Rewards Program
                description:
                  type: string
                  title: Description
                  description: Optional description of the loyalty rule
                  example: This rule rewards users daily for specific actions.
                startTime:
                  type: string
                  format: date-time
                  title: Start Time
                  description: Start time for the loyalty rule
                  example: '2024-01-01T00:00:00Z'
                endTime:
                  type: string
                  format: date-time
                  nullable: true
                  title: End Time
                  description: End time for the loyalty rule
                  example: '2024-12-31T23:59:00Z'
                effectiveStartTime:
                  oneOf:
                    - type: string
                      format: date-time
                    - type: string
                      format: 'null'
                      nullable: true
                  nullable: true
                  title: Effective Start Time
                  description: Effective start time of the rule
                  example: '2024-01-01T00:00:00Z'
                effectiveEndTime:
                  oneOf:
                    - type: string
                      format: date-time
                    - type: string
                      format: 'null'
                      nullable: true
                  nullable: true
                  title: Effective End Time
                  description: Effective end time of the rule
                  example: '2024-12-31T23:59:00Z'
                amount:
                  nullable: true
                  title: Amount
                  description: Reward amount for the loyalty rule
                  example: '10.5'
                customRewardsCsvUrl:
                  type: string
                  format: uri
                  nullable: true
                  title: Custom Rewards CSV URL
                  description: URL for uploading custom rewards via CSV
                  example: https://example.com/rewards.csv
                customRewardsApiUrl:
                  type: string
                  format: uri
                  nullable: true
                  title: Custom Rewards API URL
                  description: API URL for custom rewards integration
                  example: https://api.example.com/rewards
                subscriptionId:
                  type: string
                  nullable: true
                  title: Stratus subscription ID
                  description: Optional stratus subscription id for the rule
                  example: sub12345
                functionId:
                  type: string
                  nullable: true
                  title: Stratus function ID
                  description: Optional stratus function id for the rule
                  example: func12345
                metadata:
                  type: object
                  properties:
                    isCheckInOnEveryTxn:
                      type: boolean
                      title: Count any rule completion as check-in
                      description: >-
                        If enabled, the first transaction done on the platform
                        will complete this rule
                      example: true
                    hasPaidFullRoyalty:
                      type: boolean
                      title: Has Paid Full Royalty
                      description: Indicates if the full royalty has been paid for items.
                      example: false
                    royaltyAddress:
                      type: string
                      title: Wallet Address
                      description: >-
                        Wallet address of the user can only be used if userId is
                        not provided
                      example: '0x1234567890abcdef1234567890abcdef12345678'
                    royaltyPercentage:
                      type: number
                      minimum: 1
                      maximum: 100
                      title: Royalty Percentage
                      description: Royalty percentage of the item.
                      example: 5
                    hasVerifiedTwitter:
                      type: boolean
                      title: Has Verified Twitter
                      description: Indicates if the user has a verified Twitter account.
                      example: true
                    onlyRewardExistingUser:
                      type: boolean
                      title: Only Reward Existing User
                      description: Indicates if only existing users are rewarded.
                      example: true
                    hasNeverSold:
                      type: boolean
                      title: Has Never Sold
                      description: Indicates if the item has never been sold.
                      example: false
                    onlyNative:
                      type: boolean
                      title: Only Native
                      description: Flag indicating whether to include only native tokens.
                      example: true
                    hasFillSource:
                      type: boolean
                      title: Has Fill Source
                      description: Flag indicating whether the fill source is included.
                      example: true
                    fillSource:
                      type: string
                      title: Fill Source
                      description: Fill source of the order for the token sale
                      example: opensea.io
                    liquidity:
                      type: object
                      properties:
                        network:
                          type: string
                          enum:
                            - abstract
                            - abstractTestnet
                            - apechain
                            - arbitrum
                            - avalanche
                            - avalancheFuji
                            - base
                            - baseSepolia
                            - berachain
                            - berachainArtio
                            - berachainBepolia
                            - binance
                            - bscTestnet
                            - campTestnet
                            - fantom
                            - fantomTestnet
                            - flowMainnet
                            - mainnet
                            - nexus
                            - nexusTestnet
                            - optimism
                            - polygon
                            - polygon_mumbai
                            - skaleNebula
                            - skaleEuropa
                            - skaleCalypso
                            - solana
                            - sophon
                            - sophonTestnet
                            - sui
                            - superseed
                            - superseedSepolia
                            - vanar
                            - xai
                            - zksync
                            - coti
                            - cotiTestnet
                            - dogeosTestnet
                            - morph
                            - morphTestnet
                            - morphHolesky
                            - ultra
                            - ultraTestnet
                            - nitrograph
                            - sepolia
                            - optimism_sepolia
                            - arbitrumSepolia
                            - goerli
                            - optimism_goerli
                            - arbitrumGoerli
                            - basecamp
                            - somnia
                            - zkverify
                            - polkadot
                            - kusama
                            - horizen
                            - horizenTestnet
                            - flow_cadence
                          title: Network
                          description: Blockchain network of the liquidity pool.
                          example: mainnet
                        protocol:
                          type: string
                          title: Protocol
                          description: Protocol of the liquidity pool.
                          example: Uniswap V2
                        onlyRewardInRangeLiquidity:
                          type: boolean
                          title: Only Reward In-Range Liquidity
                          description: Indicates if only in-range liquidity is rewarded.
                          example: true
                        liquidityPerDay:
                          type: number
                          title: Liquidity Per Day
                          description: Liquidity provided per day in USD
                          example: 1000
                        customFunction:
                          type: string
                          title: Custom Function
                          description: >-
                            Custom function to calculate the the reward amount
                            based on the liquidity provided per day. X is the
                            reward amount, Y is the liquidity provided per day
                            in USD.
                          example: x = y * 1000
                        calculationType:
                          type: string
                          enum:
                            - fixed
                            - custom
                          title: Calculation Type
                          description: Calculation type of the liquidity pool.
                          example: fixed
                        pools:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                title: Liquidity Pool ID
                                description: Unique identifier of the liquidity pool.
                                example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                            required:
                              - id
                          maxItems: 20
                          title: Liquidity Pools
                          description: Array of liquidity pools associated with the rule.
                      title: Liquidity
                      description: Liquidity pool details.
                    twitterUsername:
                      type: string
                      title: Twitter Username
                      description: Twitter username of the user.
                      example: '@example_user'
                    twitterUserId:
                      type: string
                      title: Twitter User ID
                      description: Unique identifier of the Twitter user.
                      example: '1234567890'
                    twitterHashtag:
                      type: string
                      title: Twitter Hashtag
                      description: Hashtag associated with the Twitter post.
                      example: '#loyalty'
                    enableVerifiedMultiplier:
                      type: boolean
                      title: Enable Verified Multiplier
                      description: >-
                        Flag indicating whether the verified multiplier is
                        enabled.
                      example: true
                    verifiedMultiplier:
                      type: number
                      nullable: true
                      title: Verified Multiplier
                      description: Multiplier applied to rewards for verified users.
                      example: 1.5
                    isMultiplierApplied:
                      type: boolean
                      title: Is Multiplier Applied
                      description: Indicates if the multiplier has been applied to rewards.
                      example: true
                    onlyKnownUsers:
                      type: boolean
                      title: Only Known Users
                      description: Flag indicating whether to include only known users.
                      example: false
                    firstReferralReward:
                      type: number
                      nullable: true
                      title: First Referral Reward
                      description: >-
                        Percentage reward given to a user for their first
                        referral.
                      example: 10
                    referrerReward:
                      type: number
                      nullable: true
                      title: Referrer Reward
                      description: Lump sum reward given to a referrer.
                      example: 50
                    referrerRewardLoyaltyCurrencyId:
                      type: string
                      nullable: true
                      title: Referrer Reward Loyalty Currency ID
                      description: Loyalty currency ID of the referrer reward.
                      example: '1234567890'
                    secondReferralReward:
                      type: number
                      nullable: true
                      title: Second Referral Reward
                      description: Percentage reward given for a second-level referral.
                      example: 5
                    enableStreaks:
                      type: boolean
                      nullable: true
                      title: Enable Streaks
                      description: Flag indicating whether streaks are enabled.
                      example: true
                    promoCode:
                      type: string
                      title: Promo Code
                      description: Promotional code associated with the rule.
                      example: PROMO123
                    promoCodeType:
                      type: string
                      enum:
                        - code
                        - csv
                        - generate
                      title: Promo Code Type
                      description: Type of the promotional code.
                      example: code
                    promoCodeLength:
                      type: number
                      nullable: true
                      title: Promo Code Length
                      description: Numbers of the promotional code to be generated.
                      example: 10
                    promoCodeCsvUrl:
                      type: string
                      title: Promo Code CSV URL
                      description: URL of the CSV file containing promo codes.
                      example: https://example.com/promo_codes.csv
                    enableJoinDiscordServers:
                      type: boolean
                      nullable: true
                      title: Enable Join Discord Servers
                      description: >-
                        Flag indicating whether joining Discord servers is
                        required.
                      example: true
                    discordServersToJoin:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            title: Discord Server ID
                            description: ID of the Discord server to join.
                            example: '123456789012345678'
                          channels:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  title: Channel ID
                                  description: ID of the Discord channel.
                                  example: '987654321098765432'
                                text:
                                  type: string
                                  title: Text
                                  description: >-
                                    Phrase of text to be present in the discord
                                    message
                                  example: Hello
                                emojis:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        title: Emoji ID
                                        description: ID of the emoji used in the channel.
                                        example: 1f600
                                  title: Emojis
                                  description: Array of emojis used in the channel.
                            title: Channels
                            description: Array of Discord channels to join.
                          roles:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  title: Role ID
                                  description: ID of the role in the Discord server.
                                  example: role123
                              required:
                                - id
                            title: Roles
                            description: Array of roles to assign in the Discord server.
                      nullable: true
                      title: Discord Servers to Join
                      description: Array of Discord servers, channels, and roles to join.
                    streakArray:
                      type: array
                      items:
                        type: object
                        properties:
                          streakMilestone:
                            type: number
                            title: Streak Milestone
                            description: Milestone required to achieve the streak.
                            example: 5
                          streakAmount:
                            type: number
                            title: Streak Amount
                            description: Reward amount for achieving the streak milestone.
                            example: 10
                        required:
                          - streakMilestone
                          - streakAmount
                      nullable: true
                      title: Streak Array
                      description: Array of streak milestones and corresponding rewards.
                    dripQuestsToComplete:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            title: Drip Quest ID
                            description: ID of the drip quest to complete.
                            example: drip123
                        required:
                          - id
                      nullable: true
                      title: Drip Quests to Complete
                      description: Array of drip quests required to complete the rule.
                    collection:
                      type: array
                      items:
                        type: object
                        properties:
                          address:
                            type: string
                            title: Collection Address
                            description: Blockchain address of the collection.
                            example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                          network:
                            type: string
                            enum:
                              - abstract
                              - abstractTestnet
                              - apechain
                              - arbitrum
                              - avalanche
                              - avalancheFuji
                              - base
                              - baseSepolia
                              - berachain
                              - berachainArtio
                              - berachainBepolia
                              - binance
                              - bscTestnet
                              - campTestnet
                              - fantom
                              - fantomTestnet
                              - flowMainnet
                              - mainnet
                              - nexus
                              - nexusTestnet
                              - optimism
                              - polygon
                              - polygon_mumbai
                              - skaleNebula
                              - skaleEuropa
                              - skaleCalypso
                              - solana
                              - sophon
                              - sophonTestnet
                              - sui
                              - superseed
                              - superseedSepolia
                              - vanar
                              - xai
                              - zksync
                              - coti
                              - cotiTestnet
                              - dogeosTestnet
                              - morph
                              - morphTestnet
                              - morphHolesky
                              - ultra
                              - ultraTestnet
                              - nitrograph
                              - sepolia
                              - optimism_sepolia
                              - arbitrumSepolia
                              - goerli
                              - optimism_goerli
                              - arbitrumGoerli
                              - basecamp
                              - somnia
                              - zkverify
                              - polkadot
                              - kusama
                              - horizen
                              - horizenTestnet
                              - flow_cadence
                            title: Network
                            description: Blockchain network of the collection.
                            example: mainnet
                          multiplier:
                            type: number
                            title: Multiplier
                            description: >-
                              Multiplier applied to the rewards for this
                              collection.
                            example: 2
                      title: Collection
                      description: Array of collections associated with the rule.
                    range:
                      type: array
                      items:
                        type: object
                        properties:
                          startRange:
                            type: number
                            title: Start Range
                            description: Start value of the range.
                            example: 1
                          endRange:
                            type: number
                            title: End Range
                            description: End value of the range.
                            example: 10
                          amount:
                            oneOf:
                              - type: number
                              - type: string
                            title: Amount
                            description: Reward amount for this range.
                            example: 5
                          loyaltyBadgeId:
                            type: string
                            format: uuid
                            title: Loyalty Badge ID
                            description: ID of the loyalty badge for this range.
                            example: badge123
                          loyaltyMultiplierAmount:
                            type: number
                            title: Loyalty Multiplier Amount
                            description: Amount of the loyalty multiplier for this range.
                            example: 1.5
                        required:
                          - startRange
                          - endRange
                          - amount
                      title: Range
                      description: Array defining ranges and corresponding rewards.
                    customRewardsApiKey:
                      type: string
                      title: Custom Rewards API Key
                      description: API key for custom rewards integration.
                      example: api-key-1234
                    link:
                      type: string
                      nullable: true
                      title: Link
                      description: Optional link associated with the metadata.
                      example: https://example.com
                    socialPlatform:
                      type: string
                      enum:
                        - Custom
                        - Discord
                        - EpicGames
                        - Instagram
                        - Phone
                        - Steam
                        - Telegram
                        - TikTok
                        - Twitch
                        - X(Twitter)
                        - YouTube
                        - Google
                        - GitHub
                        - Reddit
                      nullable: true
                      title: Social Platform
                      description: Social media platform associated with the rule.
                      example: X(Twitter)
                    socialPlatformName:
                      type: string
                      nullable: true
                      title: Social Platform Name
                      description: Name of the social platform.
                      example: Twitter
                    socialPlatformLogo:
                      type: string
                      nullable: true
                      title: Social Platform Logo
                      description: URL of the social platform's logo.
                      example: https://example.com/logo.png
                    rewardPerImpression:
                      type: boolean
                      nullable: true
                      title: Reward Per Impression
                      description: Flag indicating if rewards are given per impression.
                      example: true
                    snapshotProposals:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            title: Snapshot Proposal ID
                            description: ID of the snapshot proposal.
                            example: proposal123
                          space:
                            type: string
                            title: Snapshot Proposal Space
                            description: Space associated with the snapshot proposal.
                            example: space123
                        required:
                          - id
                          - space
                      nullable: true
                      title: Snapshot Proposals
                      description: Array of snapshot proposals for the rule.
                    cta:
                      type: object
                      properties:
                        label:
                          type: string
                          nullable: true
                          title: CTA Label
                          description: Label for the call-to-action.
                          example: Click Here
                        href:
                          type: string
                          nullable: true
                          title: CTA Link
                          description: Link for the call-to-action.
                          example: https://example.com
                      nullable: true
                      title: Call-to-Action
                      description: Object containing details for the call-to-action.
                    hasSaleCurrency:
                      type: boolean
                      title: Has Sale Currency
                      description: Flag indicating if the sale currency is included.
                      example: false
                    isTokenHoldMultiplier:
                      type: boolean
                      title: Is Token Hold Multiplier
                      description: Flag indicating if the token hold multiplier is applied.
                      example: true
                    saleCurrency:
                      type: string
                      title: Sale Currency
                      description: Currency associated with sales.
                      example: USD
                    isRetroactive:
                      type: boolean
                      nullable: true
                      title: Is Retroactive
                      description: Flag indicating if rewards are applied retroactively.
                      example: true
                    timeDelayToVerifySeconds:
                      oneOf:
                        - type: string
                        - type: number
                      nullable: true
                      title: Time Delay to Verify
                      description: Time delay in seconds to verify actions.
                      example: 300
                    referralRequirements:
                      type: object
                      properties:
                        points:
                          type: object
                          properties:
                            amount:
                              type: number
                              nullable: true
                              title: Points Amount
                              description: Points required for referral.
                              example: 50
                            loyaltyCurrecyId:
                              type: string
                              nullable: true
                              title: Loyalty Currency ID
                              description: ID of the loyalty currency for referral.
                              example: currency123
                          nullable: true
                        achievePoints:
                          type: boolean
                          nullable: true
                          title: Achieve Points
                          description: Flag indicating if achieving points is required.
                          example: true
                        completeProfile:
                          type: boolean
                          nullable: true
                          title: Complete Profile
                          description: >-
                            Flag indicating if completing the profile is
                            required.
                          example: false
                        connectTwitter:
                          type: boolean
                          nullable: true
                          title: Connect Twitter
                          description: Flag indicating if connecting Twitter is required.
                          example: true
                        connectDiscord:
                          type: boolean
                          nullable: true
                          title: Connect Discord
                          description: Flag indicating if connecting Discord is required.
                          example: true
                        connectEmail:
                          type: boolean
                          nullable: true
                          title: Connect Email
                          description: Flag indicating if connecting email is required.
                          example: true
                      nullable: true
                      title: Referral Requirements
                      description: Object defining referral requirements.
                    multiplierLoyaltyCurrencyIds:
                      type: array
                      items:
                        type: string
                      nullable: true
                      title: Multiplier Loyalty Currency IDs
                      description: Array of loyalty currency IDs used for multipliers.
                      example:
                        - currency123
                        - currency456
                    verifyPlaceHolderText:
                      type: string
                      nullable: true
                      title: Verification Placeholder Text
                      description: Placeholder text for verification input fields.
                      example: Enter your verification code here.
                    verificationTextMinimumLength:
                      type: integer
                      nullable: true
                      title: Verification Text Minimum Length
                      description: Minimum length of the verification text.
                      example: 10
                    buttonText:
                      type: string
                      nullable: true
                      title: Button Text
                      description: Text displayed on the action button.
                      example: Verify Now
                    telegramChannelId:
                      type: string
                      nullable: true
                      title: Telegram Channel ID
                      description: ID of the Telegram channel.
                      example: telegram-channel-123
                    twitterAccountUrl:
                      type: string
                      title: Twitter Account URL
                      description: URL of the associated Twitter account.
                      example: https://twitter.com/example_user
                    twitterPostUrl:
                      type: string
                      title: Twitter Post URL
                      description: URL of the associated Twitter post.
                      example: https://twitter.com/example/status/1234567890
                    checkLike:
                      type: boolean
                      nullable: true
                      title: Check Like
                      description: Flag indicating if liking the post is required.
                      example: true
                    checkRepost:
                      type: boolean
                      nullable: true
                      title: Check Repost
                      description: Flag indicating if reposting is required.
                      example: true
                    checkComment:
                      type: boolean
                      nullable: true
                      title: Check Comment
                      description: Flag indicating if commenting is required.
                      example: true
                    checkText:
                      oneOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                      nullable: true
                      title: Check Text
                      description: Text to check in the Twitter post, username, or bio.
                      example: loyalty
                    requirePostLink:
                      type: boolean
                      nullable: true
                      title: Require Post Link
                      description: Flag indicating if the post link is required.
                      example: true
                    requirePostMediaLink:
                      type: boolean
                      nullable: true
                      title: Require Post Media Link
                      description: Flag indicating if media metadata is required.
                      example: true
                    preGeneratedPostText:
                      type: string
                      nullable: true
                      title: Pre Generated Post Text
                      description: >-
                        Pre-generated text template that will be used to prefill
                        the post content.
                      example: true
                    rewardCriteria:
                      type: string
                      enum:
                        - IMPRESSIONS_COUNT
                        - ELIGIBLE_POST
                      nullable: true
                      title: Reward Criteria
                      description: Criteria to evaluate the reward.
                      example: IMPRESSIONS_COUNT
                    smartContract:
                      type: object
                      properties:
                        contractId:
                          type: string
                          nullable: true
                          title: Smart Contract ID
                          description: ID of the smart contract.
                          example: 123e4567-e89b-12d3-a456-426614174000
                        event:
                          type: string
                          nullable: true
                          title: Smart Contract Event
                          description: Event emitted by the smart contract.
                          example: Transfer
                        type:
                          default: event
                          type: string
                          enum:
                            - function
                            - event
                          nullable: true
                          title: Smart Contract Type
                          description: Type of the smart contract interaction.
                          example: event
                        criteria:
                          type: string
                          enum:
                            - everyEvent
                            - byParameter
                          nullable: true
                          title: Smart Contract Criteria
                          description: Criteria to evaluate the smart contract event.
                          example: everyEvent
                        params:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                nullable: true
                                title: Parameter Name
                                description: Name of the smart contract parameter.
                                example: value
                              condition:
                                type: string
                                nullable: true
                                title: Parameter Condition
                                description: Condition to check for the parameter.
                                example: '>='
                              value:
                                type: string
                                nullable: true
                                title: Parameter Value
                                description: Value of the parameter.
                                example: '100'
                          nullable: true
                          title: Smart Contract Parameters
                          description: Array of parameters for the smart contract.
                        addressMapping:
                          type: string
                          nullable: true
                          title: Address Mapping
                          description: Mapping of addresses for the smart contract.
                          example: 0x123...789
                        amountMultiplier:
                          type: object
                          properties:
                            valueMapping:
                              type: string
                              nullable: true
                              title: Value Mapping
                              description: Mapping of the value for the smart contract.
                              example: amount
                          nullable: true
                          title: Amount Multiplier
                          description: >-
                            Object containing details of the amount multiplier
                            from the event.
                      title: Smart Contract
                      description: >-
                        Object containing details of the associated smart
                        contract.
                    walletType:
                      type: string
                      enum:
                        - evm
                        - solana
                        - imx
                        - sui
                        - ton
                        - cosmos
                        - ultra
                        - agw
                        - flow_cadence
                        - substrate
                      nullable: true
                      title: Wallet Type
                      description: Type of wallet associated with the rule.
                      example: evm
                    imageUrl:
                      type: string
                      nullable: true
                      title: Image URL
                      description: URL of the image associated with the rule.
                      example: https://example.com/image.png
                    onlyRewardSingleTokenOwnership:
                      type: boolean
                      nullable: true
                      title: Only reward single token ownerships
                      description: give points for only one token ownership per contract
                      example: true
                    skipMultiplier:
                      type: boolean
                      nullable: true
                      title: Skip Multiplier
                      description: Flag indicating if the multiplier is skipped.
                      example: true
                    completeProfileConditions:
                      type: object
                      additionalProperties:
                        type: boolean
                      nullable: true
                      title: Complete Profile Conditions
                      description: Conditions for completing the profile.
                      example:
                        twitter: true
                        discord: false
                    steamAppId:
                      type: string
                      nullable: true
                      title: Steam App ID
                      description: ID of the Steam app.
                      example: '1234567890'
                    githubRepoUrl:
                      type: string
                      nullable: true
                      title: GitHub Repo URL
                      description: URL of the GitHub repository to check for star.
                      example: https://github.com/owner/repo
                    githubBranchName:
                      type: string
                      nullable: true
                      title: GitHub Branch Name
                      description: Name of the GitHub branch to check for PR merge.
                      example: main
                    resetProgressOnClaim:
                      type: boolean
                      nullable: true
                      title: Reset Progress On Claim
                      description: >-
                        If enabled, the progress tracking row will be deleted
                        after a successful claim, allowing the user to re-earn
                        the rule.
                      example: true
                    rewardPerAction:
                      type: boolean
                      nullable: true
                      title: Reward Per Action
                      description: Flag indicating if the reward is rewarded per action.
                      example: true
                    rewardByBatch:
                      type: boolean
                      nullable: true
                      title: Reward by Batch
                      description: Flag indicating if the reward is rewarded by batch.
                      example: true
                    batchSize:
                      type: number
                      nullable: true
                      title: Tokens per Batch
                      description: Number of tokens per batch.
                      example: 100
                    youtubeVideoId:
                      type: string
                      nullable: true
                      title: Youtube Video ID
                      description: ID of the Youtube video.
                      example: '1234567890'
                    youtubeChannelId:
                      type: string
                      nullable: true
                      title: Youtube Channel ID
                      description: ID of the Youtube channel.
                      example: '1234567890'
                    redditPostId:
                      type: string
                      nullable: true
                      title: Reddit Post ID
                      description: ID of the Reddit post.
                      example: '1234567890'
                    isRestrictedToNewUsers:
                      type: boolean
                      title: Is Restricted to New Users
                      description: Flag indicating if the rule is restricted to new users.
                      example: false
                    allowMultipleRedemptions:
                      type: boolean
                      title: Allow Multiple Redemptions
                      description: >-
                        Flag indicating if the rule allows multiple redemptions.
                        Applies to Enter a Code only.
                      example: false
                    rewardBadgePerRange:
                      type: boolean
                      title: Reward Badge Per Range
                      description: >-
                        Flag indicating if the rule can also reward badges per
                        range.
                      example: false
                    swap:
                      type: object
                      properties:
                        provider:
                          type: string
                          enum:
                            - any
                            - relay
                            - lifi
                        relayReferrerId:
                          type: string
                        from:
                          type: object
                          properties:
                            mode:
                              type: string
                              enum:
                                - any
                                - specific
                            chain:
                              oneOf:
                                - type: string
                                  enum:
                                    - any
                                - type: number
                                - type: string
                            tokens:
                              type: array
                              items:
                                type: object
                                properties:
                                  address:
                                    type: string
                                  chainId:
                                    type: string
                                required:
                                  - address
                                  - chainId
                            trackAmount:
                              type: boolean
                        to:
                          type: object
                          properties:
                            mode:
                              type: string
                              enum:
                                - any
                                - specific
                            chain:
                              oneOf:
                                - type: string
                                  enum:
                                    - any
                                - type: number
                                - type: string
                            tokens:
                              type: array
                              items:
                                type: object
                                properties:
                                  address:
                                    type: string
                                  chainId:
                                    type: string
                                required:
                                  - address
                                  - chainId
                            trackAmount:
                              type: boolean
                        requireCrossChainSwap:
                          type: boolean
                      title: Swap Metadata
                      description: Metadata for swap loyalty rules
                    rewardPerValue:
                      type: boolean
                      title: Reward Per Value
                      description: >-
                        Flag indicating if the rule should reward based on value
                        of traded tokens instead of count.
                      example: false
                    conditionDescription:
                      type: string
                      title: Condition description
                      description: >-
                        Description of the external rule condition (only for
                        external rules)
                      example: Complete the specific task on external platform
                    directRpc:
                      type: boolean
                      title: Direct RPC
                      description: >-
                        Flag indicating if the rule should use direct RPC to get
                        the balance of tokens.
                      example: false
                    erc20Type:
                      type: string
                      enum:
                        - erc20
                        - native
                      title: ERC20 Type
                      description: Type of ERC20 token for the loyalty rule.
                      example: erc20
                    rewardQualityPosts:
                      type: boolean
                      title: Only reward quality posts
                      description: Flag indicating if the rule should reward quality posts.
                      example: false
                    minimumFollowerCount:
                      type: number
                      nullable: true
                      title: Minimum Follower Count
                      description: >-
                        Minimum follower count for the rule. Accepts both number
                        and string values.
                      example: 25
                    autoCheckInRuleIds:
                      type: array
                      items:
                        oneOf:
                          - type: string
                            format: uuid
                          - type: string
                            enum:
                              - any
                      nullable: true
                      title: Auto Check-In Rule IDs
                      description: >-
                        Array of loyalty rule IDs that count as check-in when
                        completed. If ["any"] then any rule completions count as
                        check-in.
                      example:
                        - 123e4567-e89b-12d3-a456-426614174000
                    robinhoodSymbols:
                      type: array
                      items:
                        type: string
                      nullable: true
                  title: Metadata
                  description: Additional metadata for the loyalty rule
                network:
                  default: mainnet
                  type: string
                  enum:
                    - abstract
                    - abstractTestnet
                    - apechain
                    - arbitrum
                    - avalanche
                    - avalancheFuji
                    - base
                    - baseSepolia
                    - berachain
                    - berachainArtio
                    - berachainBepolia
                    - binance
                    - bscTestnet
                    - campTestnet
                    - fantom
                    - fantomTestnet
                    - flowMainnet
                    - mainnet
                    - nexus
                    - nexusTestnet
                    - optimism
                    - polygon
                    - polygon_mumbai
                    - skaleNebula
                    - skaleEuropa
                    - skaleCalypso
                    - solana
                    - sophon
                    - sophonTestnet
                    - sui
                    - superseed
                    - superseedSepolia
                    - vanar
                    - xai
                    - zksync
                    - coti
                    - cotiTestnet
                    - dogeosTestnet
                    - morph
                    - morphTestnet
                    - morphHolesky
                    - ultra
                    - ultraTestnet
                    - nitrograph
                    - sepolia
                    - optimism_sepolia
                    - arbitrumSepolia
                    - goerli
                    - optimism_goerli
                    - arbitrumGoerli
                    - basecamp
                    - somnia
                    - zkverify
                    - polkadot
                    - kusama
                    - horizen
                    - horizenTestnet
                    - flow_cadence
                  title: Network
                  description: Blockchain network where the rule will apply
                  example: mainnet
                collectionAddress:
                  type: string
                  nullable: true
                  title: Collection Address
                  description: Blockchain address of the associated collection
                  example: '0x1234567890abcdef1234567890abcdef12345678'
                collections:
                  type: array
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                        title: Collection Address
                        description: Blockchain address of the collection
                        example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                      network:
                        type: string
                        enum:
                          - abstract
                          - abstractTestnet
                          - apechain
                          - arbitrum
                          - avalanche
                          - avalancheFuji
                          - base
                          - baseSepolia
                          - berachain
                          - berachainArtio
                          - berachainBepolia
                          - binance
                          - bscTestnet
                          - campTestnet
                          - fantom
                          - fantomTestnet
                          - flowMainnet
                          - mainnet
                          - nexus
                          - nexusTestnet
                          - optimism
                          - polygon
                          - polygon_mumbai
                          - skaleNebula
                          - skaleEuropa
                          - skaleCalypso
                          - solana
                          - sophon
                          - sophonTestnet
                          - sui
                          - superseed
                          - superseedSepolia
                          - vanar
                          - xai
                          - zksync
                          - coti
                          - cotiTestnet
                          - dogeosTestnet
                          - morph
                          - morphTestnet
                          - morphHolesky
                          - ultra
                          - ultraTestnet
                          - nitrograph
                          - sepolia
                          - optimism_sepolia
                          - arbitrumSepolia
                          - goerli
                          - optimism_goerli
                          - arbitrumGoerli
                          - basecamp
                          - somnia
                          - zkverify
                          - polkadot
                          - kusama
                          - horizen
                          - horizenTestnet
                          - flow_cadence
                        title: Network
                        description: Blockchain network for the collection
                        example: mainnet
                      symbol:
                        type: string
                        title: Symbol
                        description: Symbol of the collection.
                        example: COLL
                    required:
                      - address
                      - network
                  nullable: true
                  title: Collections
                  description: List of associated collections
                hideInUi:
                  default: false
                  type: boolean
                  title: Hide in UI
                  description: Whether to hide this rule in the user interface
                  example: false
                showBeforeStart:
                  default: false
                  type: boolean
                  title: Show before start
                  description: Whether to show this rule before the start time
                  example: false
                trackProgress:
                  type: boolean
                  title: Track Progress
                  description: >-
                    Flag indicating if the progress is tracked. If enabled, the
                    rule can only be completed once the progress is 100%.
                  example: true
                progressType:
                  type: string
                  enum:
                    - counter
                    - percentage
                  nullable: true
                  title: Progress Type
                  description: >-
                    How tracked progress is interpreted. "percentage" counts
                    0-100 and is shown as a percentage. "counter" counts up to
                    the highest reward range end and is shown as a raw count.
                  example: percentage
                isRequired:
                  default: false
                  type: boolean
                  title: Is Required
                  description: Whether this rule is required for participation
                  example: true
                oauthCredentialsId:
                  type: string
                  format: uuid
                  nullable: true
                  title: OAuth Credentials ID
                  description: ID for associated OAuth credentials
                  example: 123e4567-e89b-12d3-a456-426614174000
                rewardType:
                  default: points
                  type: string
                  enum:
                    - points
                    - multiplier
                    - badge
                    - token
                  title: Reward Type
                  description: Type of reward issued by this rule
                  example: points
                loyaltyCurrencyId:
                  type: string
                  format: uuid
                  title: Loyalty Currency ID
                  description: >-
                    Loyalty currency. Optional when rewardType is token and
                    tokenReward is provided; backend resolves the hidden
                    currency from the contract.
                  example: 456e1234-e89b-12d3-a456-426614174003
                tokenReward:
                  type: object
                  properties:
                    relayerId:
                      type: string
                      format: uuid
                      title: Relayer ID
                      description: >-
                        Stratus relayer for token distribution (same network as
                        contract)
                    contractId:
                      type: string
                      format: uuid
                      title: Contract ID
                      description: >-
                        ERC-20 contract to reward with; must match relayer
                        network. Required unless isNative is true.
                    isNative:
                      type: boolean
                      title: Native Gas Token
                      description: >-
                        When true, reward is the chain native gas token (ETH,
                        MATIC, BNB, …) and contractId is omitted.
                  required:
                    - relayerId
                  title: Token Reward
                  description: >-
                    When rewardType is token, provide relayer and either an
                    ERC-20 contract or isNative=true to find or create the
                    hidden loyalty currency and onchain token.
                frequency:
                  type: string
                  enum:
                    - none
                    - once
                    - hourly
                    - daily
                    - weekly
                    - monthly
                    - immediately
                  title: Frequency
                  description: Frequency of the rule execution
                  example: daily
                interval:
                  type: string
                  enum:
                    - hourly
                    - daily
                    - weekly
                    - monthly
                    - once
                    - custom
                    - every_message
                    - unlimited
                  title: Interval
                  description: Time interval for recurring rule execution
                  example: weekly
                loyaltyRuleGroupId:
                  oneOf:
                    - type: string
                      format: uuid
                    - type: string
                      enum:
                        - no-section
                  nullable: true
                  title: Rule Group Section ID
                  description: ID of the rule group section to associate with the rule
                  example: 123e4567-e89b-12d3-a456-426614174005
                mediaUrl:
                  type: string
                  nullable: true
                  title: Media URL
                  description: URL of the media to be displayed
                  example: https://example.com/media.png
                maxAmountPerInterval:
                  type: number
                  nullable: true
                  title: Max Amount Per Interval
                  description: >-
                    The maximum amount of points a user can earn per interval.
                    Available for the smart contract and external rules.
                  example: 100
                maxAmountInterval:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                    - lifetime
                  nullable: true
                  title: Max Amount Interval
                  description: >-
                    The interval for the max amount. Available for the smart
                    contract and external rules.
                  example: daily
                externalIntegrationId:
                  type: string
                  format: uuid
                  nullable: true
                  title: External Integration ID
                  description: ID of the external integration
                  example: 123e4567-e89b-12d3-a456-426614174005
                shopifyStoreUrl:
                  type: string
                  nullable: true
                  title: Shopify Store URL
                  description: URL of the Shopify store
                  example: https://example.com
                rewardLifetime:
                  type: string
                  enum:
                    - permanent
                    - dynamic
                  nullable: true
                  title: Reward Lifetime
                  description: The lifetime of the reward
                  example: permanent
                claimType:
                  type: string
                  enum:
                    - manual
                    - auto
                  nullable: true
                  title: Claim Type
                  description: The type of claim for the reward
                  example: auto
                contractIds:
                  type: array
                  items:
                    type: string
                  nullable: true
                  title: Contract IDs
                  description: The IDs of the contracts
                  example:
                    - 123e4567-e89b-12d3-a456-426614174005
                dappDeployedWithin:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                  nullable: true
                  title: dApp Deployed In Last
                  description: Filter dApps by deployment age before ranking.
                  example: daily
                dappDataWindow:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                  nullable: true
                  title: dApp Data Window
                  description: >-
                    Reward based on data usage within the last day, week, or
                    month. Leave it empty for all time usage.
                  example: daily
                deletedAt:
                  type: string
                  format: date-time
                  nullable: true
                  title: Deleted At
                  description: >-
                    Timestamp when the loyalty rule was deleted. Set to null to
                    restore a deleted rule.
                  example: null
              required:
                - name
                - startTime
                - endTime
                - amount
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                    required:
                      - id
                  - type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        title: Name
                        description: Name of the loyalty rule
                        example: Daily Rewards Program
                      description:
                        type: string
                        title: Description
                        description: Optional description of the loyalty rule
                        example: This rule rewards users daily for specific actions.
                      startTime:
                        type: string
                        format: date-time
                        title: Start Time
                        description: Start time for the loyalty rule
                        example: '2024-01-01T00:00:00Z'
                      endTime:
                        type: string
                        format: date-time
                        nullable: true
                        title: End Time
                        description: End time for the loyalty rule
                        example: '2024-12-31T23:59:00Z'
                      effectiveStartTime:
                        oneOf:
                          - type: string
                            format: date-time
                          - type: string
                            format: 'null'
                            nullable: true
                        nullable: true
                        title: Effective Start Time
                        description: Effective start time of the rule
                        example: '2024-01-01T00:00:00Z'
                      effectiveEndTime:
                        oneOf:
                          - type: string
                            format: date-time
                          - type: string
                            format: 'null'
                            nullable: true
                        nullable: true
                        title: Effective End Time
                        description: Effective end time of the rule
                        example: '2024-12-31T23:59:00Z'
                      amount:
                        nullable: true
                        title: Amount
                        description: Reward amount for the loyalty rule
                        example: '10.5'
                      customRewardsCsvUrl:
                        type: string
                        format: uri
                        nullable: true
                        title: Custom Rewards CSV URL
                        description: URL for uploading custom rewards via CSV
                        example: https://example.com/rewards.csv
                      customRewardsApiUrl:
                        type: string
                        format: uri
                        nullable: true
                        title: Custom Rewards API URL
                        description: API URL for custom rewards integration
                        example: https://api.example.com/rewards
                      subscriptionId:
                        type: string
                        nullable: true
                        title: Stratus subscription ID
                        description: Optional stratus subscription id for the rule
                        example: sub12345
                      functionId:
                        type: string
                        nullable: true
                        title: Stratus function ID
                        description: Optional stratus function id for the rule
                        example: func12345
                      metadata:
                        type: object
                        properties:
                          isCheckInOnEveryTxn:
                            type: boolean
                            title: Count any rule completion as check-in
                            description: >-
                              If enabled, the first transaction done on the
                              platform will complete this rule
                            example: true
                          hasPaidFullRoyalty:
                            type: boolean
                            title: Has Paid Full Royalty
                            description: >-
                              Indicates if the full royalty has been paid for
                              items.
                            example: false
                          royaltyAddress:
                            type: string
                            title: Wallet Address
                            description: >-
                              Wallet address of the user can only be used if
                              userId is not provided
                            example: '0x1234567890abcdef1234567890abcdef12345678'
                          royaltyPercentage:
                            type: number
                            minimum: 1
                            maximum: 100
                            title: Royalty Percentage
                            description: Royalty percentage of the item.
                            example: 5
                          hasVerifiedTwitter:
                            type: boolean
                            title: Has Verified Twitter
                            description: >-
                              Indicates if the user has a verified Twitter
                              account.
                            example: true
                          onlyRewardExistingUser:
                            type: boolean
                            title: Only Reward Existing User
                            description: Indicates if only existing users are rewarded.
                            example: true
                          hasNeverSold:
                            type: boolean
                            title: Has Never Sold
                            description: Indicates if the item has never been sold.
                            example: false
                          onlyNative:
                            type: boolean
                            title: Only Native
                            description: >-
                              Flag indicating whether to include only native
                              tokens.
                            example: true
                          hasFillSource:
                            type: boolean
                            title: Has Fill Source
                            description: >-
                              Flag indicating whether the fill source is
                              included.
                            example: true
                          fillSource:
                            type: string
                            title: Fill Source
                            description: Fill source of the order for the token sale
                            example: opensea.io
                          liquidity:
                            type: object
                            properties:
                              network:
                                type: string
                                enum:
                                  - abstract
                                  - abstractTestnet
                                  - apechain
                                  - arbitrum
                                  - avalanche
                                  - avalancheFuji
                                  - base
                                  - baseSepolia
                                  - berachain
                                  - berachainArtio
                                  - berachainBepolia
                                  - binance
                                  - bscTestnet
                                  - campTestnet
                                  - fantom
                                  - fantomTestnet
                                  - flowMainnet
                                  - mainnet
                                  - nexus
                                  - nexusTestnet
                                  - optimism
                                  - polygon
                                  - polygon_mumbai
                                  - skaleNebula
                                  - skaleEuropa
                                  - skaleCalypso
                                  - solana
                                  - sophon
                                  - sophonTestnet
                                  - sui
                                  - superseed
                                  - superseedSepolia
                                  - vanar
                                  - xai
                                  - zksync
                                  - coti
                                  - cotiTestnet
                                  - dogeosTestnet
                                  - morph
                                  - morphTestnet
                                  - morphHolesky
                                  - ultra
                                  - ultraTestnet
                                  - nitrograph
                                  - sepolia
                                  - optimism_sepolia
                                  - arbitrumSepolia
                                  - goerli
                                  - optimism_goerli
                                  - arbitrumGoerli
                                  - basecamp
                                  - somnia
                                  - zkverify
                                  - polkadot
                                  - kusama
                                  - horizen
                                  - horizenTestnet
                                  - flow_cadence
                                title: Network
                                description: Blockchain network of the liquidity pool.
                                example: mainnet
                              protocol:
                                type: string
                                title: Protocol
                                description: Protocol of the liquidity pool.
                                example: Uniswap V2
                              onlyRewardInRangeLiquidity:
                                type: boolean
                                title: Only Reward In-Range Liquidity
                                description: >-
                                  Indicates if only in-range liquidity is
                                  rewarded.
                                example: true
                              liquidityPerDay:
                                type: number
                                title: Liquidity Per Day
                                description: Liquidity provided per day in USD
                                example: 1000
                              customFunction:
                                type: string
                                title: Custom Function
                                description: >-
                                  Custom function to calculate the the reward
                                  amount based on the liquidity provided per
                                  day. X is the reward amount, Y is the
                                  liquidity provided per day in USD.
                                example: x = y * 1000
                              calculationType:
                                type: string
                                enum:
                                  - fixed
                                  - custom
                                title: Calculation Type
                                description: Calculation type of the liquidity pool.
                                example: fixed
                              pools:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      title: Liquidity Pool ID
                                      description: Unique identifier of the liquidity pool.
                                      example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                                  required:
                                    - id
                                maxItems: 20
                                title: Liquidity Pools
                                description: >-
                                  Array of liquidity pools associated with the
                                  rule.
                            title: Liquidity
                            description: Liquidity pool details.
                          twitterUsername:
                            type: string
                            title: Twitter Username
                            description: Twitter username of the user.
                            example: '@example_user'
                          twitterUserId:
                            type: string
                            title: Twitter User ID
                            description: Unique identifier of the Twitter user.
                            example: '1234567890'
                          twitterHashtag:
                            type: string
                            title: Twitter Hashtag
                            description: Hashtag associated with the Twitter post.
                            example: '#loyalty'
                          enableVerifiedMultiplier:
                            type: boolean
                            title: Enable Verified Multiplier
                            description: >-
                              Flag indicating whether the verified multiplier is
                              enabled.
                            example: true
                          verifiedMultiplier:
                            type: number
                            nullable: true
                            title: Verified Multiplier
                            description: Multiplier applied to rewards for verified users.
                            example: 1.5
                          isMultiplierApplied:
                            type: boolean
                            title: Is Multiplier Applied
                            description: >-
                              Indicates if the multiplier has been applied to
                              rewards.
                            example: true
                          onlyKnownUsers:
                            type: boolean
                            title: Only Known Users
                            description: >-
                              Flag indicating whether to include only known
                              users.
                            example: false
                          firstReferralReward:
                            type: number
                            nullable: true
                            title: First Referral Reward
                            description: >-
                              Percentage reward given to a user for their first
                              referral.
                            example: 10
                          referrerReward:
                            type: number
                            nullable: true
                            title: Referrer Reward
                            description: Lump sum reward given to a referrer.
                            example: 50
                          referrerRewardLoyaltyCurrencyId:
                            type: string
                            nullable: true
                            title: Referrer Reward Loyalty Currency ID
                            description: Loyalty currency ID of the referrer reward.
                            example: '1234567890'
                          secondReferralReward:
                            type: number
                            nullable: true
                            title: Second Referral Reward
                            description: >-
                              Percentage reward given for a second-level
                              referral.
                            example: 5
                          enableStreaks:
                            type: boolean
                            nullable: true
                            title: Enable Streaks
                            description: Flag indicating whether streaks are enabled.
                            example: true
                          promoCode:
                            type: string
                            title: Promo Code
                            description: Promotional code associated with the rule.
                            example: PROMO123
                          promoCodeType:
                            type: string
                            enum:
                              - code
                              - csv
                              - generate
                            title: Promo Code Type
                            description: Type of the promotional code.
                            example: code
                          promoCodeLength:
                            type: number
                            nullable: true
                            title: Promo Code Length
                            description: Numbers of the promotional code to be generated.
                            example: 10
                          promoCodeCsvUrl:
                            type: string
                            title: Promo Code CSV URL
                            description: URL of the CSV file containing promo codes.
                            example: https://example.com/promo_codes.csv
                          enableJoinDiscordServers:
                            type: boolean
                            nullable: true
                            title: Enable Join Discord Servers
                            description: >-
                              Flag indicating whether joining Discord servers is
                              required.
                            example: true
                          discordServersToJoin:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  title: Discord Server ID
                                  description: ID of the Discord server to join.
                                  example: '123456789012345678'
                                channels:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        title: Channel ID
                                        description: ID of the Discord channel.
                                        example: '987654321098765432'
                                      text:
                                        type: string
                                        title: Text
                                        description: >-
                                          Phrase of text to be present in the
                                          discord message
                                        example: Hello
                                      emojis:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              title: Emoji ID
                                              description: ID of the emoji used in the channel.
                                              example: 1f600
                                        title: Emojis
                                        description: Array of emojis used in the channel.
                                  title: Channels
                                  description: Array of Discord channels to join.
                                roles:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        title: Role ID
                                        description: ID of the role in the Discord server.
                                        example: role123
                                    required:
                                      - id
                                  title: Roles
                                  description: >-
                                    Array of roles to assign in the Discord
                                    server.
                            nullable: true
                            title: Discord Servers to Join
                            description: >-
                              Array of Discord servers, channels, and roles to
                              join.
                          streakArray:
                            type: array
                            items:
                              type: object
                              properties:
                                streakMilestone:
                                  type: number
                                  title: Streak Milestone
                                  description: Milestone required to achieve the streak.
                                  example: 5
                                streakAmount:
                                  type: number
                                  title: Streak Amount
                                  description: >-
                                    Reward amount for achieving the streak
                                    milestone.
                                  example: 10
                              required:
                                - streakMilestone
                                - streakAmount
                            nullable: true
                            title: Streak Array
                            description: >-
                              Array of streak milestones and corresponding
                              rewards.
                          dripQuestsToComplete:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  title: Drip Quest ID
                                  description: ID of the drip quest to complete.
                                  example: drip123
                              required:
                                - id
                            nullable: true
                            title: Drip Quests to Complete
                            description: >-
                              Array of drip quests required to complete the
                              rule.
                          collection:
                            type: array
                            items:
                              type: object
                              properties:
                                address:
                                  type: string
                                  title: Collection Address
                                  description: Blockchain address of the collection.
                                  example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                                network:
                                  type: string
                                  enum:
                                    - abstract
                                    - abstractTestnet
                                    - apechain
                                    - arbitrum
                                    - avalanche
                                    - avalancheFuji
                                    - base
                                    - baseSepolia
                                    - berachain
                                    - berachainArtio
                                    - berachainBepolia
                                    - binance
                                    - bscTestnet
                                    - campTestnet
                                    - fantom
                                    - fantomTestnet
                                    - flowMainnet
                                    - mainnet
                                    - nexus
                                    - nexusTestnet
                                    - optimism
                                    - polygon
                                    - polygon_mumbai
                                    - skaleNebula
                                    - skaleEuropa
                                    - skaleCalypso
                                    - solana
                                    - sophon
                                    - sophonTestnet
                                    - sui
                                    - superseed
                                    - superseedSepolia
                                    - vanar
                                    - xai
                                    - zksync
                                    - coti
                                    - cotiTestnet
                                    - dogeosTestnet
                                    - morph
                                    - morphTestnet
                                    - morphHolesky
                                    - ultra
                                    - ultraTestnet
                                    - nitrograph
                                    - sepolia
                                    - optimism_sepolia
                                    - arbitrumSepolia
                                    - goerli
                                    - optimism_goerli
                                    - arbitrumGoerli
                                    - basecamp
                                    - somnia
                                    - zkverify
                                    - polkadot
                                    - kusama
                                    - horizen
                                    - horizenTestnet
                                    - flow_cadence
                                  title: Network
                                  description: Blockchain network of the collection.
                                  example: mainnet
                                multiplier:
                                  type: number
                                  title: Multiplier
                                  description: >-
                                    Multiplier applied to the rewards for this
                                    collection.
                                  example: 2
                            title: Collection
                            description: Array of collections associated with the rule.
                          range:
                            type: array
                            items:
                              type: object
                              properties:
                                startRange:
                                  type: number
                                  title: Start Range
                                  description: Start value of the range.
                                  example: 1
                                endRange:
                                  type: number
                                  title: End Range
                                  description: End value of the range.
                                  example: 10
                                amount:
                                  oneOf:
                                    - type: number
                                    - type: string
                                  title: Amount
                                  description: Reward amount for this range.
                                  example: 5
                                loyaltyBadgeId:
                                  type: string
                                  format: uuid
                                  title: Loyalty Badge ID
                                  description: ID of the loyalty badge for this range.
                                  example: badge123
                                loyaltyMultiplierAmount:
                                  type: number
                                  title: Loyalty Multiplier Amount
                                  description: >-
                                    Amount of the loyalty multiplier for this
                                    range.
                                  example: 1.5
                              required:
                                - startRange
                                - endRange
                                - amount
                            title: Range
                            description: Array defining ranges and corresponding rewards.
                          customRewardsApiKey:
                            type: string
                            title: Custom Rewards API Key
                            description: API key for custom rewards integration.
                            example: api-key-1234
                          link:
                            type: string
                            nullable: true
                            title: Link
                            description: Optional link associated with the metadata.
                            example: https://example.com
                          socialPlatform:
                            type: string
                            enum:
                              - Custom
                              - Discord
                              - EpicGames
                              - Instagram
                              - Phone
                              - Steam
                              - Telegram
                              - TikTok
                              - Twitch
                              - X(Twitter)
                              - YouTube
                              - Google
                              - GitHub
                              - Reddit
                            nullable: true
                            title: Social Platform
                            description: Social media platform associated with the rule.
                            example: X(Twitter)
                          socialPlatformName:
                            type: string
                            nullable: true
                            title: Social Platform Name
                            description: Name of the social platform.
                            example: Twitter
                          socialPlatformLogo:
                            type: string
                            nullable: true
                            title: Social Platform Logo
                            description: URL of the social platform's logo.
                            example: https://example.com/logo.png
                          rewardPerImpression:
                            type: boolean
                            nullable: true
                            title: Reward Per Impression
                            description: >-
                              Flag indicating if rewards are given per
                              impression.
                            example: true
                          snapshotProposals:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  title: Snapshot Proposal ID
                                  description: ID of the snapshot proposal.
                                  example: proposal123
                                space:
                                  type: string
                                  title: Snapshot Proposal Space
                                  description: Space associated with the snapshot proposal.
                                  example: space123
                              required:
                                - id
                                - space
                            nullable: true
                            title: Snapshot Proposals
                            description: Array of snapshot proposals for the rule.
                          cta:
                            type: object
                            properties:
                              label:
                                type: string
                                nullable: true
                                title: CTA Label
                                description: Label for the call-to-action.
                                example: Click Here
                              href:
                                type: string
                                nullable: true
                                title: CTA Link
                                description: Link for the call-to-action.
                                example: https://example.com
                            nullable: true
                            title: Call-to-Action
                            description: Object containing details for the call-to-action.
                          hasSaleCurrency:
                            type: boolean
                            title: Has Sale Currency
                            description: Flag indicating if the sale currency is included.
                            example: false
                          isTokenHoldMultiplier:
                            type: boolean
                            title: Is Token Hold Multiplier
                            description: >-
                              Flag indicating if the token hold multiplier is
                              applied.
                            example: true
                          saleCurrency:
                            type: string
                            title: Sale Currency
                            description: Currency associated with sales.
                            example: USD
                          isRetroactive:
                            type: boolean
                            nullable: true
                            title: Is Retroactive
                            description: >-
                              Flag indicating if rewards are applied
                              retroactively.
                            example: true
                          timeDelayToVerifySeconds:
                            oneOf:
                              - type: string
                              - type: number
                            type: number
                            nullable: true
                            title: Time Delay to Verify
                            description: Time delay in seconds to verify actions.
                            example: 300
                          referralRequirements:
                            type: object
                            properties:
                              points:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    nullable: true
                                    title: Points Amount
                                    description: Points required for referral.
                                    example: 50
                                  loyaltyCurrecyId:
                                    type: string
                                    nullable: true
                                    title: Loyalty Currency ID
                                    description: ID of the loyalty currency for referral.
                                    example: currency123
                                nullable: true
                              achievePoints:
                                type: boolean
                                nullable: true
                                title: Achieve Points
                                description: >-
                                  Flag indicating if achieving points is
                                  required.
                                example: true
                              completeProfile:
                                type: boolean
                                nullable: true
                                title: Complete Profile
                                description: >-
                                  Flag indicating if completing the profile is
                                  required.
                                example: false
                              connectTwitter:
                                type: boolean
                                nullable: true
                                title: Connect Twitter
                                description: >-
                                  Flag indicating if connecting Twitter is
                                  required.
                                example: true
                              connectDiscord:
                                type: boolean
                                nullable: true
                                title: Connect Discord
                                description: >-
                                  Flag indicating if connecting Discord is
                                  required.
                                example: true
                              connectEmail:
                                type: boolean
                                nullable: true
                                title: Connect Email
                                description: >-
                                  Flag indicating if connecting email is
                                  required.
                                example: true
                            nullable: true
                            title: Referral Requirements
                            description: Object defining referral requirements.
                          multiplierLoyaltyCurrencyIds:
                            type: array
                            items:
                              type: string
                            nullable: true
                            title: Multiplier Loyalty Currency IDs
                            description: >-
                              Array of loyalty currency IDs used for
                              multipliers.
                            example:
                              - currency123
                              - currency456
                          verifyPlaceHolderText:
                            type: string
                            nullable: true
                            title: Verification Placeholder Text
                            description: Placeholder text for verification input fields.
                            example: Enter your verification code here.
                          verificationTextMinimumLength:
                            type: integer
                            nullable: true
                            title: Verification Text Minimum Length
                            description: Minimum length of the verification text.
                            example: 10
                          buttonText:
                            type: string
                            nullable: true
                            title: Button Text
                            description: Text displayed on the action button.
                            example: Verify Now
                          telegramChannelId:
                            type: string
                            nullable: true
                            title: Telegram Channel ID
                            description: ID of the Telegram channel.
                            example: telegram-channel-123
                          twitterAccountUrl:
                            type: string
                            title: Twitter Account URL
                            description: URL of the associated Twitter account.
                            example: https://twitter.com/example_user
                          twitterPostUrl:
                            type: string
                            title: Twitter Post URL
                            description: URL of the associated Twitter post.
                            example: https://twitter.com/example/status/1234567890
                          checkLike:
                            type: boolean
                            nullable: true
                            title: Check Like
                            description: Flag indicating if liking the post is required.
                            example: true
                          checkRepost:
                            type: boolean
                            nullable: true
                            title: Check Repost
                            description: Flag indicating if reposting is required.
                            example: true
                          checkComment:
                            type: boolean
                            nullable: true
                            title: Check Comment
                            description: Flag indicating if commenting is required.
                            example: true
                          checkText:
                            oneOf:
                              - type: string
                              - type: array
                                items:
                                  type: string
                            nullable: true
                            title: Check Text
                            description: >-
                              Text to check in the Twitter post, username, or
                              bio.
                            example: loyalty
                          requirePostLink:
                            type: boolean
                            nullable: true
                            title: Require Post Link
                            description: Flag indicating if the post link is required.
                            example: true
                          requirePostMediaLink:
                            type: boolean
                            nullable: true
                            title: Require Post Media Link
                            description: Flag indicating if media metadata is required.
                            example: true
                          preGeneratedPostText:
                            type: string
                            nullable: true
                            title: Pre Generated Post Text
                            description: >-
                              Pre-generated text template that will be used to
                              prefill the post content.
                            example: true
                          rewardCriteria:
                            type: string
                            enum:
                              - IMPRESSIONS_COUNT
                              - ELIGIBLE_POST
                            nullable: true
                            title: Reward Criteria
                            description: Criteria to evaluate the reward.
                            example: IMPRESSIONS_COUNT
                          smartContract:
                            type: object
                            properties:
                              contractId:
                                type: string
                                nullable: true
                                title: Smart Contract ID
                                description: ID of the smart contract.
                                example: 123e4567-e89b-12d3-a456-426614174000
                              event:
                                type: string
                                nullable: true
                                title: Smart Contract Event
                                description: Event emitted by the smart contract.
                                example: Transfer
                              type:
                                default: event
                                type: string
                                enum:
                                  - function
                                  - event
                                nullable: true
                                title: Smart Contract Type
                                description: Type of the smart contract interaction.
                                example: event
                              criteria:
                                type: string
                                enum:
                                  - everyEvent
                                  - byParameter
                                nullable: true
                                title: Smart Contract Criteria
                                description: Criteria to evaluate the smart contract event.
                                example: everyEvent
                              params:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                      nullable: true
                                      title: Parameter Name
                                      description: Name of the smart contract parameter.
                                      example: value
                                    condition:
                                      type: string
                                      nullable: true
                                      title: Parameter Condition
                                      description: Condition to check for the parameter.
                                      example: '>='
                                    value:
                                      type: string
                                      nullable: true
                                      title: Parameter Value
                                      description: Value of the parameter.
                                      example: '100'
                                nullable: true
                                title: Smart Contract Parameters
                                description: Array of parameters for the smart contract.
                              addressMapping:
                                type: string
                                nullable: true
                                title: Address Mapping
                                description: Mapping of addresses for the smart contract.
                                example: 0x123...789
                              amountMultiplier:
                                type: object
                                properties:
                                  valueMapping:
                                    type: string
                                    nullable: true
                                    title: Value Mapping
                                    description: >-
                                      Mapping of the value for the smart
                                      contract.
                                    example: amount
                                nullable: true
                                title: Amount Multiplier
                                description: >-
                                  Object containing details of the amount
                                  multiplier from the event.
                            title: Smart Contract
                            description: >-
                              Object containing details of the associated smart
                              contract.
                          walletType:
                            type: string
                            enum:
                              - evm
                              - solana
                              - imx
                              - sui
                              - ton
                              - cosmos
                              - ultra
                              - agw
                              - flow_cadence
                              - substrate
                            nullable: true
                            title: Wallet Type
                            description: Type of wallet associated with the rule.
                            example: evm
                          imageUrl:
                            type: string
                            nullable: true
                            title: Image URL
                            description: URL of the image associated with the rule.
                            example: https://example.com/image.png
                          onlyRewardSingleTokenOwnership:
                            type: boolean
                            nullable: true
                            title: Only reward single token ownerships
                            description: >-
                              give points for only one token ownership per
                              contract
                            example: true
                          skipMultiplier:
                            type: boolean
                            nullable: true
                            title: Skip Multiplier
                            description: Flag indicating if the multiplier is skipped.
                            example: true
                          completeProfileConditions:
                            type: object
                            additionalProperties:
                              type: boolean
                            nullable: true
                            title: Complete Profile Conditions
                            description: Conditions for completing the profile.
                            example:
                              twitter: true
                              discord: false
                          steamAppId:
                            type: string
                            nullable: true
                            title: Steam App ID
                            description: ID of the Steam app.
                            example: '1234567890'
                          githubRepoUrl:
                            type: string
                            nullable: true
                            title: GitHub Repo URL
                            description: URL of the GitHub repository to check for star.
                            example: https://github.com/owner/repo
                          githubBranchName:
                            type: string
                            nullable: true
                            title: GitHub Branch Name
                            description: Name of the GitHub branch to check for PR merge.
                            example: main
                          resetProgressOnClaim:
                            type: boolean
                            nullable: true
                            title: Reset Progress On Claim
                            description: >-
                              If enabled, the progress tracking row will be
                              deleted after a successful claim, allowing the
                              user to re-earn the rule.
                            example: true
                          rewardPerAction:
                            type: boolean
                            nullable: true
                            title: Reward Per Action
                            description: >-
                              Flag indicating if the reward is rewarded per
                              action.
                            example: true
                          rewardByBatch:
                            type: boolean
                            nullable: true
                            title: Reward by Batch
                            description: >-
                              Flag indicating if the reward is rewarded by
                              batch.
                            example: true
                          batchSize:
                            type: number
                            nullable: true
                            title: Tokens per Batch
                            description: Number of tokens per batch.
                            example: 100
                          youtubeVideoId:
                            type: string
                            nullable: true
                            title: Youtube Video ID
                            description: ID of the Youtube video.
                            example: '1234567890'
                          youtubeChannelId:
                            type: string
                            nullable: true
                            title: Youtube Channel ID
                            description: ID of the Youtube channel.
                            example: '1234567890'
                          redditPostId:
                            type: string
                            nullable: true
                            title: Reddit Post ID
                            description: ID of the Reddit post.
                            example: '1234567890'
                          isRestrictedToNewUsers:
                            type: boolean
                            title: Is Restricted to New Users
                            description: >-
                              Flag indicating if the rule is restricted to new
                              users.
                            example: false
                          allowMultipleRedemptions:
                            type: boolean
                            title: Allow Multiple Redemptions
                            description: >-
                              Flag indicating if the rule allows multiple
                              redemptions. Applies to Enter a Code only.
                            example: false
                          rewardBadgePerRange:
                            type: boolean
                            title: Reward Badge Per Range
                            description: >-
                              Flag indicating if the rule can also reward badges
                              per range.
                            example: false
                          swap:
                            type: object
                            properties:
                              provider:
                                type: string
                                enum:
                                  - any
                                  - relay
                                  - lifi
                              relayReferrerId:
                                type: string
                              from:
                                type: object
                                properties:
                                  mode:
                                    type: string
                                    enum:
                                      - any
                                      - specific
                                  chain:
                                    oneOf:
                                      - type: string
                                        enum:
                                          - any
                                      - type: number
                                      - type: string
                                    type: number
                                  tokens:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        address:
                                          type: string
                                        chainId:
                                          type: string
                                      required:
                                        - address
                                        - chainId
                                  trackAmount:
                                    type: boolean
                              to:
                                type: object
                                properties:
                                  mode:
                                    type: string
                                    enum:
                                      - any
                                      - specific
                                  chain:
                                    oneOf:
                                      - type: string
                                        enum:
                                          - any
                                      - type: number
                                      - type: string
                                    type: number
                                  tokens:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        address:
                                          type: string
                                        chainId:
                                          type: string
                                      required:
                                        - address
                                        - chainId
                                  trackAmount:
                                    type: boolean
                              requireCrossChainSwap:
                                type: boolean
                            title: Swap Metadata
                            description: Metadata for swap loyalty rules
                          rewardPerValue:
                            type: boolean
                            title: Reward Per Value
                            description: >-
                              Flag indicating if the rule should reward based on
                              value of traded tokens instead of count.
                            example: false
                          conditionDescription:
                            type: string
                            title: Condition description
                            description: >-
                              Description of the external rule condition (only
                              for external rules)
                            example: Complete the specific task on external platform
                          directRpc:
                            type: boolean
                            title: Direct RPC
                            description: >-
                              Flag indicating if the rule should use direct RPC
                              to get the balance of tokens.
                            example: false
                          erc20Type:
                            type: string
                            enum:
                              - erc20
                              - native
                            title: ERC20 Type
                            description: Type of ERC20 token for the loyalty rule.
                            example: erc20
                          rewardQualityPosts:
                            type: boolean
                            title: Only reward quality posts
                            description: >-
                              Flag indicating if the rule should reward quality
                              posts.
                            example: false
                          minimumFollowerCount:
                            type: number
                            nullable: true
                            title: Minimum Follower Count
                            description: >-
                              Minimum follower count for the rule. Accepts both
                              number and string values.
                            example: 25
                          autoCheckInRuleIds:
                            type: array
                            items:
                              oneOf:
                                - type: string
                                  format: uuid
                                - type: string
                                  enum:
                                    - any
                            nullable: true
                            title: Auto Check-In Rule IDs
                            description: >-
                              Array of loyalty rule IDs that count as check-in
                              when completed. If ["any"] then any rule
                              completions count as check-in.
                            example:
                              - 123e4567-e89b-12d3-a456-426614174000
                          robinhoodSymbols:
                            type: array
                            items:
                              type: string
                            nullable: true
                        title: Metadata
                        description: Additional metadata for the loyalty rule
                      network:
                        default: mainnet
                        type: string
                        enum:
                          - abstract
                          - abstractTestnet
                          - apechain
                          - arbitrum
                          - avalanche
                          - avalancheFuji
                          - base
                          - baseSepolia
                          - berachain
                          - berachainArtio
                          - berachainBepolia
                          - binance
                          - bscTestnet
                          - campTestnet
                          - fantom
                          - fantomTestnet
                          - flowMainnet
                          - mainnet
                          - nexus
                          - nexusTestnet
                          - optimism
                          - polygon
                          - polygon_mumbai
                          - skaleNebula
                          - skaleEuropa
                          - skaleCalypso
                          - solana
                          - sophon
                          - sophonTestnet
                          - sui
                          - superseed
                          - superseedSepolia
                          - vanar
                          - xai
                          - zksync
                          - coti
                          - cotiTestnet
                          - dogeosTestnet
                          - morph
                          - morphTestnet
                          - morphHolesky
                          - ultra
                          - ultraTestnet
                          - nitrograph
                          - sepolia
                          - optimism_sepolia
                          - arbitrumSepolia
                          - goerli
                          - optimism_goerli
                          - arbitrumGoerli
                          - basecamp
                          - somnia
                          - zkverify
                          - polkadot
                          - kusama
                          - horizen
                          - horizenTestnet
                          - flow_cadence
                        title: Network
                        description: Blockchain network where the rule will apply
                        example: mainnet
                      collectionAddress:
                        type: string
                        nullable: true
                        title: Collection Address
                        description: Blockchain address of the associated collection
                        example: '0x1234567890abcdef1234567890abcdef12345678'
                      collections:
                        type: array
                        items:
                          type: object
                          properties:
                            address:
                              type: string
                              title: Collection Address
                              description: Blockchain address of the collection
                              example: '0xabcdefabcdefabcdefabcdefabcdefabcdef'
                            network:
                              type: string
                              enum:
                                - abstract
                                - abstractTestnet
                                - apechain
                                - arbitrum
                                - avalanche
                                - avalancheFuji
                                - base
                                - baseSepolia
                                - berachain
                                - berachainArtio
                                - berachainBepolia
                                - binance
                                - bscTestnet
                                - campTestnet
                                - fantom
                                - fantomTestnet
                                - flowMainnet
                                - mainnet
                                - nexus
                                - nexusTestnet
                                - optimism
                                - polygon
                                - polygon_mumbai
                                - skaleNebula
                                - skaleEuropa
                                - skaleCalypso
                                - solana
                                - sophon
                                - sophonTestnet
                                - sui
                                - superseed
                                - superseedSepolia
                                - vanar
                                - xai
                                - zksync
                                - coti
                                - cotiTestnet
                                - dogeosTestnet
                                - morph
                                - morphTestnet
                                - morphHolesky
                                - ultra
                                - ultraTestnet
                                - nitrograph
                                - sepolia
                                - optimism_sepolia
                                - arbitrumSepolia
                                - goerli
                                - optimism_goerli
                                - arbitrumGoerli
                                - basecamp
                                - somnia
                                - zkverify
                                - polkadot
                                - kusama
                                - horizen
                                - horizenTestnet
                                - flow_cadence
                              title: Network
                              description: Blockchain network for the collection
                              example: mainnet
                            symbol:
                              type: string
                              title: Symbol
                              description: Symbol of the collection.
                              example: COLL
                          required:
                            - address
                            - network
                        nullable: true
                        title: Collections
                        description: List of associated collections
                      hideInUi:
                        default: false
                        type: boolean
                        title: Hide in UI
                        description: Whether to hide this rule in the user interface
                        example: false
                      showBeforeStart:
                        default: false
                        type: boolean
                        title: Show before start
                        description: Whether to show this rule before the start time
                        example: false
                      trackProgress:
                        type: boolean
                        title: Track Progress
                        description: >-
                          Flag indicating if the progress is tracked. If
                          enabled, the rule can only be completed once the
                          progress is 100%.
                        example: true
                      progressType:
                        type: string
                        enum:
                          - counter
                          - percentage
                        nullable: true
                        title: Progress Type
                        description: >-
                          How tracked progress is interpreted. "percentage"
                          counts 0-100 and is shown as a percentage. "counter"
                          counts up to the highest reward range end and is shown
                          as a raw count.
                        example: percentage
                      isRequired:
                        default: false
                        type: boolean
                        title: Is Required
                        description: Whether this rule is required for participation
                        example: true
                      oauthCredentialsId:
                        type: string
                        format: uuid
                        nullable: true
                        title: OAuth Credentials ID
                        description: ID for associated OAuth credentials
                        example: 123e4567-e89b-12d3-a456-426614174000
                      rewardType:
                        default: points
                        type: string
                        enum:
                          - points
                          - multiplier
                          - badge
                          - token
                        title: Reward Type
                        description: Type of reward issued by this rule
                        example: points
                      loyaltyCurrencyId:
                        type: string
                        format: uuid
                        title: Loyalty Currency ID
                        description: >-
                          Loyalty currency. Optional when rewardType is token
                          and tokenReward is provided; backend resolves the
                          hidden currency from the contract.
                        example: 456e1234-e89b-12d3-a456-426614174003
                      tokenReward:
                        type: object
                        properties:
                          relayerId:
                            type: string
                            format: uuid
                            title: Relayer ID
                            description: >-
                              Stratus relayer for token distribution (same
                              network as contract)
                          contractId:
                            type: string
                            format: uuid
                            title: Contract ID
                            description: >-
                              ERC-20 contract to reward with; must match relayer
                              network. Required unless isNative is true.
                          isNative:
                            type: boolean
                            title: Native Gas Token
                            description: >-
                              When true, reward is the chain native gas token
                              (ETH, MATIC, BNB, …) and contractId is omitted.
                        required:
                          - relayerId
                        title: Token Reward
                        description: >-
                          When rewardType is token, provide relayer and either
                          an ERC-20 contract or isNative=true to find or create
                          the hidden loyalty currency and onchain token.
                      frequency:
                        type: string
                        enum:
                          - none
                          - once
                          - hourly
                          - daily
                          - weekly
                          - monthly
                          - immediately
                        title: Frequency
                        description: Frequency of the rule execution
                        example: daily
                      interval:
                        type: string
                        enum:
                          - hourly
                          - daily
                          - weekly
                          - monthly
                          - once
                          - custom
                          - every_message
                          - unlimited
                        title: Interval
                        description: Time interval for recurring rule execution
                        example: weekly
                      loyaltyRuleGroupId:
                        oneOf:
                          - type: string
                            format: uuid
                          - type: string
                            enum:
                              - no-section
                        nullable: true
                        title: Rule Group Section ID
                        description: >-
                          ID of the rule group section to associate with the
                          rule
                        example: 123e4567-e89b-12d3-a456-426614174005
                      mediaUrl:
                        type: string
                        nullable: true
                        title: Media URL
                        description: URL of the media to be displayed
                        example: https://example.com/media.png
                      maxAmountPerInterval:
                        type: number
                        nullable: true
                        title: Max Amount Per Interval
                        description: >-
                          The maximum amount of points a user can earn per
                          interval. Available for the smart contract and
                          external rules.
                        example: 100
                      maxAmountInterval:
                        type: string
                        enum:
                          - daily
                          - weekly
                          - monthly
                          - lifetime
                        nullable: true
                        title: Max Amount Interval
                        description: >-
                          The interval for the max amount. Available for the
                          smart contract and external rules.
                        example: daily
                      externalIntegrationId:
                        type: string
                        format: uuid
                        nullable: true
                        title: External Integration ID
                        description: ID of the external integration
                        example: 123e4567-e89b-12d3-a456-426614174005
                      shopifyStoreUrl:
                        type: string
                        nullable: true
                        title: Shopify Store URL
                        description: URL of the Shopify store
                        example: https://example.com
                      rewardLifetime:
                        type: string
                        enum:
                          - permanent
                          - dynamic
                        nullable: true
                        title: Reward Lifetime
                        description: The lifetime of the reward
                        example: permanent
                      claimType:
                        type: string
                        enum:
                          - manual
                          - auto
                        nullable: true
                        title: Claim Type
                        description: The type of claim for the reward
                        example: auto
                      contractIds:
                        type: array
                        items:
                          type: string
                        nullable: true
                        title: Contract IDs
                        description: The IDs of the contracts
                        example:
                          - 123e4567-e89b-12d3-a456-426614174005
                      dappDeployedWithin:
                        type: string
                        enum:
                          - daily
                          - weekly
                          - monthly
                        nullable: true
                        title: dApp Deployed In Last
                        description: Filter dApps by deployment age before ranking.
                        example: daily
                      dappDataWindow:
                        type: string
                        enum:
                          - daily
                          - weekly
                          - monthly
                        nullable: true
                        title: dApp Data Window
                        description: >-
                          Reward based on data usage within the last day, week,
                          or month. Leave it empty for all time usage.
                        example: daily
                      deletedAt:
                        type: string
                        format: date-time
                        nullable: true
                        title: Deleted At
                        description: >-
                          Timestamp when the loyalty rule was deleted. Set to
                          null to restore a deleted rule.
                        example: null
                    required:
                      - name
                      - startTime
                      - endTime
                      - amount
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````