API Reference

Flipguard API (1.0.1) specification.

All endpoints require an API key sent via x-api-key header, and have a rate limit of 1 request per second. You can generate API keys for your Flipsuite configuration on the dashboard.

To use Flipguard API you have to activate the Starter or Pro plan in your Flipsuite configuration first. Please check our store for details about features and pricing.

💸 Tipping

Below you can find endpoints related to tipping. Every tip, airdrop or raffle made via API will use your server tipping wallet to distribute rewards, so make sure to setup one before proceeding. Once you log into the dashboard and create a Flipsuite configuration - go to the tipping tab to set it up. YouTube API usage example here.

Please note that even though the requests have a rate limit of 1 per second - your tips, airdrops and raffles can, and will be delayed by a few or more seconds if you try to create a lot of them at once.

Create automated airdrops in your server

POSThttps://api.flipguard.xyz/v1/flipsuite/airdrops
Header parameters
Body
channelIdstring

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

Pattern: ^\d+$
itemobject
countdowninteger

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

maxEntriesinteger

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

commentnullable string

Note that will be shown on the airdrop message. Cannot be longer than 256 characters.

requiredRoleIdsnullable array of string

Roles that are allowed to enter the airdrop.

forbiddenRoleIdsnullable array of string

Roles that are forbidden from entering the airdrop.

forbiddenUserIdsnullable array of string

Users that are forbidden from entering the airdrop.

Response

Airdrop has been created successfully

Request
const response = await fetch('https://api.flipguard.xyz/v1/flipsuite/airdrops', {
    method: 'POST',
    headers: {
      "x-api-key": "123e4567-e89b-12d3-a456-426614174000",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "channelId": "1234567890123456789",
      "item": {
        "type": "TOKEN",
        "chain": "Polygon",
        "tokenAddress": "0x162539172b53e9a93b7d98fb6c41682de558a320",
        "amount": 1000
      },
      "countdown": 60000,
      "maxEntries": 10,
      "comment": "Hello, world!",
      "requiredRoleIds": [
        "12345678901234567891",
        "12345678901234567892",
        "12345678901234567893"
      ],
      "forbiddenRoleIds": [
        "12345678901234567894",
        "12345678901234567895",
        "12345678901234567896"
      ],
      "forbiddenUserIds": [
        "12345678901234567897",
        "12345678901234567898",
        "12345678901234567899"
      ]
    }),
});
const data = await response.json();

Create automated raffles in your server

POSThttps://api.flipguard.xyz/v1/flipsuite/raffles
Header parameters
Body
channelIdstring

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

Pattern: ^\d+$
itemone of
countdowninteger

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

maxEntriesinteger

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

commentnullable string

Note that will be shown on the raffle message. Cannot be longer than 256 characters.

requiredRoleIdsnullable array of string

Roles that are allowed to enter the raffle.

forbiddenRoleIdsnullable array of string

Roles that are forbidden from entering the airdrop.

forbiddenUserIdsnullable array of string

Users that are forbidden from entering the airdrop.

Response

Raffle has been created successfully

Request
const response = await fetch('https://api.flipguard.xyz/v1/flipsuite/raffles', {
    method: 'POST',
    headers: {
      "x-api-key": "123e4567-e89b-12d3-a456-426614174000",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "channelId": "1234567890123456789",
      "item": {
        "type": "TOKEN",
        "chain": "Polygon",
        "tokenAddress": "0x162539172b53e9a93b7d98fb6c41682de558a320",
        "amount": 1000
      },
      "countdown": 60000,
      "maxEntries": 10,
      "comment": "Hello, world!",
      "requiredRoleIds": [
        "12345678901234567891",
        "12345678901234567892",
        "12345678901234567893"
      ],
      "forbiddenRoleIds": [
        "12345678901234567894",
        "12345678901234567895",
        "12345678901234567896"
      ],
      "forbiddenUserIds": [
        "12345678901234567897",
        "12345678901234567898",
        "12345678901234567899"
      ]
    }),
});
const data = await response.json();

Send automated tips in your server

POSThttps://api.flipguard.xyz/v1/flipsuite/tips
Header parameters
Body
channelIdstring

ID of a Discord channel in your server where the tip should be sent.

Pattern: ^\d+$
recipientIdstring

ID of a Discord user in your server that should receive the tip.

Pattern: ^\d+$
itemone of
commentnullable string

Note that will be shown on the tip message. Cannot be longer than 256 characters.

Response

Tip has been sent successfully

Request
const response = await fetch('https://api.flipguard.xyz/v1/flipsuite/tips', {
    method: 'POST',
    headers: {
      "x-api-key": "123e4567-e89b-12d3-a456-426614174000",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "channelId": "1234567890123456789",
      "recipientId": "1234567890123456789",
      "item": {
        "type": "TOKEN",
        "chain": "Polygon",
        "tokenAddress": "0x162539172b53e9a93b7d98fb6c41682de558a320",
        "amount": 1000
      },
      "comment": "Hello, world!"
    }),
});
const data = await response.json();

Last updated