POST
/
api
/
loyalty
/
rules

Authorizations

X-API-KEY
string
header
required

Body

application/json

Schema for creating a new loyalty rule with detailed validations

amount
any | null
required

Reward amount associated with the rule

effectiveEndTime
required

The effective end time of the rule

effectiveStartTime
required

The effective start time of the rule

endTime
string | null
required

When the rule becomes inactive

frequency
enum<string>
required

Execution frequency of the loyalty rule

Available options:
none,
once,
daily,
weekly,
monthly,
immediately
loyaltyCurrencyId
string
required

Unique identifier for the loyalty currency

metadata
object
required

Additional metadata for the loyalty rule

name
string
required

Name of the loyalty rule

Minimum length: 1
organizationId
string
required

Unique identifier for the organization creating the rule

startTime
string | null
required

When the rule becomes active

type
enum<string>
required

Type of loyalty rule being created

Available options:
Bonus,
BoughtOn,
BoughtWithRoyalties,
DiscordMessages,
Listing,
Lodging,
MintOn,
PoapClaim,
SnagSocialsConnected,
SnapshotFullset,
SnapshotHold,
SoldOn,
SoldWithRoyalties,
TokenHold,
TwitterBio,
TwitterHashTagPost,
Retweet,
check_in,
code_entry,
connect_wallet,
connected_discord,
connected_email,
connected_epic,
connected_steam,
connected_telegram,
connected_twitter,
create_partner_account,
discord_member,
drip_x_follow,
drip_x_new_tweet,
drip_x_text_in_bio,
drip_x_text_in_comment,
drip_x_text_in_name,
drip_x_tweet,
external_rule,
link_click,
manual_upload,
profile_completed,
referred_user,
smart_contract_event,
snapshot_governance,
telegram_join,
telegram_messages,
text_input,
token_hold_erc20,
tweet_liked_by_project,
twitter_comment,
twitter_follow,
twitter_followers,
twitter_like,
twitter_post_hashtag,
quiz,
poll
websiteId
string
required

Unique identifier for the associated website

backgroundAssetUrl
string

URL of the background asset to be displayed

collectionAddress
string

Blockchain address of the associated collection

collections
object[] | null

List of associated collections

customRewardsApiUrl
string | null

URL for fetching custom rewards

customRewardsCsvUrl
string | null

URL for uploading custom rewards via CSV

description
string

Optional detailed description of the rule

hideInUi
boolean
default:
false

Whether to hide this rule in the user interface

interval
enum<string> | null

Interval between rule executions

Available options:
daily,
weekly,
monthly,
once
isRequired
boolean
default:
false

Whether this rule is mandatory

loyaltyRuleGroupId

Unique identifier for the loyalty rule group

Available options:
no-section
network
enum<string>
default:
mainnet

Blockchain network where the rule will apply

Available options:
mainnet,
polygon,
polygon_mumbai,
optimism,
arbitrum,
binance,
bscTestnet,
avalanche,
avalancheFuji,
zksync,
fantom,
fantomTestnet,
base,
baseSepolia,
skaleNebula,
xai,
berachainArtio,
solana,
apechain,
flowMainnet,
campTestnet,
sui,
vanar,
sepolia,
optimism_sepolia,
arbitrumSepolia,
goerli,
optimism_goerli,
arbitrumGoerli
oauthCredentialsId
string | null

OAuth credentials associated with the rule

rewardType
enum<string>
default:
points

Type of reward issued by the rule

Available options:
points,
multiplier
subscriptionIdentifier
string | null

Identifier for associated subscriptions

Response

200 - application/json

Schema for creating a new loyalty rule with detailed validations

amount
any | null
required

Reward amount associated with the rule

effectiveEndTime
required

The effective end time of the rule

effectiveStartTime
required

The effective start time of the rule

endTime
string | null
required

When the rule becomes inactive

frequency
enum<string>
required

Execution frequency of the loyalty rule

Available options:
none,
once,
daily,
weekly,
monthly,
immediately
id
string
required
loyaltyCurrencyId
string
required

Unique identifier for the loyalty currency

metadata
object
required

Additional metadata for the loyalty rule

name
string
required

Name of the loyalty rule

Minimum length: 1
organizationId
string
required

Unique identifier for the organization creating the rule

startTime
string | null
required

When the rule becomes active

type
enum<string>
required

Type of loyalty rule being created

Available options:
Bonus,
BoughtOn,
BoughtWithRoyalties,
DiscordMessages,
Listing,
Lodging,
MintOn,
PoapClaim,
SnagSocialsConnected,
SnapshotFullset,
SnapshotHold,
SoldOn,
SoldWithRoyalties,
TokenHold,
TwitterBio,
TwitterHashTagPost,
Retweet,
check_in,
code_entry,
connect_wallet,
connected_discord,
connected_email,
connected_epic,
connected_steam,
connected_telegram,
connected_twitter,
create_partner_account,
discord_member,
drip_x_follow,
drip_x_new_tweet,
drip_x_text_in_bio,
drip_x_text_in_comment,
drip_x_text_in_name,
drip_x_tweet,
external_rule,
link_click,
manual_upload,
profile_completed,
referred_user,
smart_contract_event,
snapshot_governance,
telegram_join,
telegram_messages,
text_input,
token_hold_erc20,
tweet_liked_by_project,
twitter_comment,
twitter_follow,
twitter_followers,
twitter_like,
twitter_post_hashtag,
quiz,
poll
websiteId
string
required

Unique identifier for the associated website

backgroundAssetUrl
string

URL of the background asset to be displayed

collectionAddress
string

Blockchain address of the associated collection

collections
object[] | null

List of associated collections

customRewardsApiUrl
string | null

URL for fetching custom rewards

customRewardsCsvUrl
string | null

URL for uploading custom rewards via CSV

description
string

Optional detailed description of the rule

hideInUi
boolean
default:
false

Whether to hide this rule in the user interface

interval
enum<string> | null

Interval between rule executions

Available options:
daily,
weekly,
monthly,
once
isRequired
boolean
default:
false

Whether this rule is mandatory

loyaltyRuleGroupId

Unique identifier for the loyalty rule group

Available options:
no-section
network
enum<string>
default:
mainnet

Blockchain network where the rule will apply

Available options:
mainnet,
polygon,
polygon_mumbai,
optimism,
arbitrum,
binance,
bscTestnet,
avalanche,
avalancheFuji,
zksync,
fantom,
fantomTestnet,
base,
baseSepolia,
skaleNebula,
xai,
berachainArtio,
solana,
apechain,
flowMainnet,
campTestnet,
sui,
vanar,
sepolia,
optimism_sepolia,
arbitrumSepolia,
goerli,
optimism_goerli,
arbitrumGoerli
oauthCredentialsId
string | null

OAuth credentials associated with the rule

rewardType
enum<string>
default:
points

Type of reward issued by the rule

Available options:
points,
multiplier
subscriptionIdentifier
string | null

Identifier for associated subscriptions