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",
  "item": {
    "type": "TOKEN",
    "chain": "Polygon",
    "tokenAddress": "0x162539172b53e9a93b7d98fb6c41682de558a320",
    "amount": 1000
  },
  "countdown": 60000,
  "maxEntries": 10,
  "maxWinners": 5,
  "comment": "Hello, world!",
  "allowedRoleIds": [
    "12345678901234567891",
    "12345678901234567892"
  ],
  "allowedUserIds": [
    "12345678901234567893",
    "12345678901234567894"
  ],
  "forbiddenRoleIds": [
    "12345678901234567895",
    "12345678901234567896"
  ],
  "forbiddenUserIds": [
    "12345678901234567897",
    "12345678901234567898"
  ]
}'

Headers

x-api-key
string<uuid>
required

Your community API key.

Body

application/json
channelId
string

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

item
object
countdown
integer

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

maxEntries
integer
default:10

Maximum number of entries. Must be an integer between 1 and 500.

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

Maximum number of winners.

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

Note that will be shown on the raffle message.

Maximum length: 256
allowedRoleIds
string[] | null

Roles that are allowed to enter the raffle.

Maximum length: 16

ID of a Discord role.

allowedUserIds
string[] | null

Users that are allowed to enter the raffle.

Maximum length: 16

ID of a Discord user.

forbiddenRoleIds
string[] | null

Roles that are forbidden from entering the airdrop.

Maximum length: 16

ID of a Discord role.

forbiddenUserIds
string[] | null

Users that are forbidden from entering the airdrop.

Maximum length: 16

ID of a Discord user.

Response

201

Raffle has been created successfully