Skip to main content
POST
/
v1
/
community
/
tipping
/
raffles
cURL
curl --request POST \
  --url https://api.flipsuite.xyz/v1/community/tipping/raffles \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "channelId": "1234567890123456789",
  "countdown": 60000,
  "maxEntries": 10,
  "maxWinners": 1,
  "comment": "Enjoy the raffle!",
  "item": {
    "type": "TOKEN",
    "chain": "Polygon",
    "tokenAddress": "0x162539172b53e9a93b7d98fb6c41682de558a320",
    "amount": 1000
  }
}
'

Headers

x-api-key
string<uuid>
required

Your community API key

Body

application/json
channelId
string
required

ID of a Discord channel in your server where the raffle should be created.

Pattern: ^\d+$
item
Points · object
required

Points, tokens, NFT, or Discord role to raffle.

countdown
integer
required

Number of milliseconds before the raffle ends and the prize is distributed. Cannot be longer than 30 days.

Required range: 1000 <= x <= 2592000000
maxEntries
integer
required

Maximum number of entries.

Required range: 1 <= x <= 500
maxWinners
integer | null

Maximum number of winners.

Required range: 1 <= x <= 500
comment
string | null

Note that will be shown on the raffle message.

Maximum string length: 256
allowedRoleIds
string[] | null

IDs of roles that are allowed to enter the raffle.

Maximum array length: 16
Pattern: ^\d+$
allowedUserIds
string[] | null

IDs of users that are allowed to enter the raffle.

Maximum array length: 16
Pattern: ^\d+$
forbiddenRoleIds
string[] | null

IDs of roles that are forbidden from entering the raffle.

Maximum array length: 16
Pattern: ^\d+$
forbiddenUserIds
string[] | null

IDs of users that are forbidden from entering the raffle.

Maximum array length: 16
Pattern: ^\d+$

Response

201

Raffle has been created successfully