api.alphabot.app Open in urlscan Pro
2606:4700:3108::ac42:2b4b  Public Scan

Submitted URL: http://api.alphabot.app/
Effective URL: https://api.alphabot.app/v1
Submission: On January 15 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

 * Alphabot API General Rules
 * Raffles
   * getGet raffles list
   * getGet single raffle
   * postRegister for a raffle
   * getGet raffle winners
 * Projects
   * getGet projects list
   * getGet single project
 * Webhooks
   * Validating webhook requests
   * postraffle:active
   * postraffle:created
   * postraffle:edited
   * postraffle:ended
   * postraffle:finalized
   * postraffle:deleted
   * postraffle:won
   * postproject:added
   * postproject:edited
   * postproject:removed
   * postproject:minting
   * postwebhook:test
 * Changelog
   * v1.0.3
   * v1.0.2
   * v1.0.1

API docs by Redocly





ALPHABOT API (1.0.3)

Download OpenAPI specification:Download

URL: https://www.alphabot.app Terms of Service




Alphabot user documentation


ALPHABOT API GENERAL RULES

Any user or team with an active subscription can access this API.

 * Users with a premium subscription can find and refresh their API key and
   Webhook URL in their profile
 * Teams with an active subscription can find and refresh their API and Webhook
   URL on the team page
 * The API key should be passed as a Bearer token, prefixed with Bearer in the
   Authorization header

There are subtle differences between what a user and a team can access. Look for
the red and green circles in the documentation below to determine what each API
key type has available.

Rate limits are applied and endpoints will return a 429 status code when
exceeded.

 * Use Webhooks to avoid needing to get API data on rate-limited endpoints!
 * Rate limits are applied seperately for each endpoint by API key
 * Check response headers starting with X-Rate-Limit to avoid exceeding the
   limits

All dates and times will be sent as a number, representing the milliseconds
epoch, or Unix timestamp in milliseconds.

The base URL of the API is https://api.alphabot.app/v1/. The below endpoints
should be appended to this url.


RAFFLES

A raffle is the main entity within Alphabot. This is where information about a
project is shared with the user, as well as what kind of reward they can hope to
gain by entering the raffle. Raffles are created by teams, and set up with user
entry requirements across various platforms: Discord, Telegram, Twitter,
Blockchain, Email, and Captcha.

More information about raffles


GET RAFFLES LIST

Retrieve a paginated list of raffles using the same sorting and filtering
options found on the Alphabot website.

--------------------------------------------------------------------------------

Available to: 🟢User | 🟢Team

⚡️ Rate limited to 30 requests every hour

AUTHORIZATIONS:

bearerAuth

QUERY PARAMETERS

search
string

Search string to filter results with.

sort
string
Default: "newest"
Enum: "oldest" "newest" "ending" "minting"

The way to sort the raffle list results.

sortDir
number
Default: -1
Enum: 1 -1

The direction the sorted results should return in. 1 = ascending, -1 =
descending

filter
string
Enum: "winners" "lost" "pending" "unregistered"

Quick filter to apply to raffle results. Exclude for no filter.

alpha
string

The ID of the team to filter results for. Exclude for all teams.

scope
string
Default: "all"
Enum: "all" "community" "starred"

Filter for the visibility of raffles.

status
string
Enum: "draft" "prestart" "active" "ended" "finalized"

Search string to filter results with.

reqOptions
Array of strings
Items Enum: "n" "d" "r" "f" "l" "t" "g"

Options for what types of raffle requirements to include in the results. If you
pass any value, all other values will be excluded.

Values: n=NFT, d=Discord, r=Discord Roles, f=Follow, l=Like, t=Retweet,
g=Telegram

pageNum
number >= 0
Default: 0

Page number for current request.

pageSize
number [ 1 .. 50 ]
Default: 30

Page size of results.


RESPONSES

200

A list of raffles to be returned

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

get/raffles
https://api.alphabot.app/v1/raffles


REQUEST SAMPLES

 * Node

Copy

await fetch('//api.alphabot.app/v1/raffles', {
  method: 'GET',
  headers: new Headers({
    Authorization: `Bearer ${API_KEY}`,
  }),
});


RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "raffles": [
       * {
          * "_id": "string",
          * "slug": "string",
          * "name": "string",
          * "type": "raffle",
          * "status": "draft",
          * "visibility": "public",
          * "description": "string",
          * "startDate": 0,
          * "endDate": 0,
          * "winnerCount": 0,
          * "bannerImageUrl": "string",
          * "blockchain": "ETH",
          * "twitterUrl": "string",
          * "discordUrl": "string",
          * "entryCount": 0,
          * "reqString": "string",
          * "projectId": "string",
          * "teamId": "string"
         
         }
      
      ],
    * "finalPage": true
   
   }

}






GET SINGLE RAFFLE

Retrieve a single raffle by slug.

Note: the return object will vary based on parameters that are passed in. These
docs only show the object that is returned if no parameters are passed.

--------------------------------------------------------------------------------

Available to: 🟢User | 🟢Team

⚡️ Rate limited to 30 requests every hour

AUTHORIZATIONS:

bearerAuth

PATH PARAMETERS

slug
required
string

Slug unique identifier of the raffle to retrieve.

QUERY PARAMETERS

winners
boolean
Default: false

Include winners in raffle response. Only available for Finalized raffles, to the
team who created the raffle, or the project associated to it.

entries
boolean
Default: false

Include all entries in raffle response. Only available to the team who created
the raffle, or the project associated to it.

requirements
boolean
Default: false

Include requirements in the raffle response.


RESPONSES

200

A list of raffles to be returned

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

get/raffles/{slug}
https://api.alphabot.app/v1/raffles/{slug}


REQUEST SAMPLES

 * Node

Copy

await fetch('//api.alphabot.app/v1/raffles/test-webhook-1-lszuna', {
  method: 'GET',
  headers: new Headers({
    Authorization: `Bearer ${API_KEY}`,
  }),
});


RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string"
      
      },
    * "entry": {
       * "userId": "string",
       * "slug": "string",
       * "mintAddress": "string",
       * "email": "string",
       * "discordId": "string",
       * "discordName": "string",
       * "twitterId": "string",
       * "twitterName": "string",
       * "telegramId": "string",
       * "telegramName": "string",
       * "image": "string",
       * "createdDate": 0,
       * "entries": 0,
       * "tokensEntries": 0,
       * "discordEntries": 0,
       * "source": "discord",
       * "lossMultipliedEntries": 0,
       * "answers": {
          * "questionId": 0,
          * "answer": "string"
         
         },
       * "applicationCode": "string",
       * "approved": true,
       * "approvedOn": 0,
       * "approvedBy": "string",
       * "winnerImage": "string",
       * "winner": true,
       * "premium": true,
       * "extraEntry": true,
       * "picked": 0,
       * "raffleId": "string",
       * "projectId": "string",
       * "teamId": "string"
      
      }
   
   }

}






REGISTER FOR A RAFFLE

Submit your user's registration for a raffle, and include values to overwrite
submission data

--------------------------------------------------------------------------------

Available to: 🟢User | 🔴Team

⚡️ Rate limited to 100 requests every 5 minutes

AUTHORIZATIONS:

bearerAuth

REQUEST BODY SCHEMA: APPLICATION/JSON



slug
required
string

Slug to identify the raffle to enter

mintAddress
string

Mint address to submit to the raffle. Must match with the raffle's blockchain.
Will use your profile default if not provided

discordId
string

Discord ID to submit to the raffle. Will use your profile default if not
provided

twitterId
string

Twitter ID to submit to the raffle. Will use your profile default if not
provided

telegramId
string

Telegram ID to submit to the raffle. Will use your profile default if not
provided

extraEntry
boolean
Default: false

If true, the checking process will verify Twitter requirements, and you will
receive an extra entry if they are completed.


RESPONSES

200

Status of the raffle registration

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

post/register
https://api.alphabot.app/v1/register


REQUEST SAMPLES

 * Payload
 * Node

Content type
application/json
Copy
{
 * "slug": "string",
 * "mintAddress": "string",
 * "discordId": "string",
 * "twitterId": "string",
 * "telegramId": "string",
 * "extraEntry": false

}



RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "resultMd": "string",
    * "validation": {
       * "entries": 0,
       * "discordRefresh": true,
       * "discordValid": true,
       * "twitterValid": true,
       * "tokensValid": true,
       * "discordValidations": [
          * true
         
         ],
       * "twitterValidations": [
          * true
         
         ],
       * "tokensValidations": [
          * true
         
         ],
       * "telegramValidations": [
          * true
         
         ],
       * "passwordInvalid": true,
       * "ethBalanceValid": true,
       * "questionsValid": true,
       * "questionValidations": [
          * true
         
         ],
       * "appCodeInvalid": true,
       * "emailValid": true,
       * "success": true,
       * "reason": "string"
      
      },
    * "pendingCheck": {
       * "start": 0,
       * "complete": 0,
       * "completed": {
          * "rt": 0,
          * "follow": 0,
          * "nft": 0,
          * "discord": 0,
          * "email": 0,
          * "telegram": 0
         
         }
      
      }
   
   }

}






GET RAFFLE WINNERS

Retrieve winners of a raffle, or of all raffles associated to the Team's project

--------------------------------------------------------------------------------

Available to: 🔴User | 🟢Team

⚡️ Rate limited to 30 requests every hour

AUTHORIZATIONS:

bearerAuth

QUERY PARAMETERS

slug
string

Slug to identify the raffle to get winners of. Raffle must be finalized, and
must be either created by the current team, or associated to the team's project

allProjectWinners
boolean

If set to true, will return all winners for raffles associated to the current
team's project. This is only available to teams that have set up a project by
verifying the project's Twitter account on the team page

walletsOnly
boolean

If set to true, will return only an array of submitted mint addresses. Note: if
a raffle does not have the Connect Wallet requirement set, this will result in
an array filled with undefined values


RESPONSES

200

Raffle winners list

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

get/winners
https://api.alphabot.app/v1/winners


REQUEST SAMPLES

 * Node

Copy

await fetch('//api.alphabot.app/v1/winners?allProjectWinners=true', {
  method: 'GET',
  headers: new Headers({
    Authorization: `Bearer ${API_KEY}`,
  }),
});


RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "winners": [
       * {
          * "userId": "string",
          * "slug": "string",
          * "mintAddress": "string",
          * "email": "string",
          * "discordId": "string",
          * "discordName": "string",
          * "twitterId": "string",
          * "twitterName": "string",
          * "telegramId": "string",
          * "telegramName": "string",
          * "image": "string",
          * "createdDate": 0,
          * "entries": 0,
          * "tokensEntries": 0,
          * "discordEntries": 0,
          * "source": "discord",
          * "lossMultipliedEntries": 0,
          * "answers": {
             * "questionId": 0,
             * "answer": "string"
            
            },
          * "applicationCode": "string",
          * "approved": true,
          * "approvedOn": 0,
          * "approvedBy": "string",
          * "winnerImage": "string",
          * "winner": true,
          * "premium": true,
          * "extraEntry": true,
          * "picked": 0,
          * "raffleId": "string",
          * "projectId": "string",
          * "teamId": "string"
         
         }
      
      ]
   
   }

}






PROJECTS

A project or company added and vetted within Alphabot. Projects populate the
projects list and the calendar page, as well as the daily Discord & Telegram bot
output.


GET PROJECTS LIST

Retrieve a paginated list of projects using the same sorting and filtering
options found on the Alphabot website.

--------------------------------------------------------------------------------

Available to: 🔴User | 🟢Team

⚡️ Rate limited to 30 requests every hour

AUTHORIZATIONS:

bearerAuth

QUERY PARAMETERS

search
string

Search string to filter results with.

sort
string
Default: "dateCreated"
Enum: "mintDate" "starCount" "name" "lastUpdated" "dateCreated"

The way to sort the raffle list results.

sortDir
number
Default: -1
Enum: 1 -1

The direction the sorted results should return in. 1 = ascending, -1 =
descending

blockchains
Array of strings
Items Enum: "ETH" "SOL" "BTC" "BTCs" "MATIC" "BSC" "ARB" "AVAX" "SUI" "SEI"
"TON" "INJ" "ICP" "MANTA" "MNT" "ADA" "XRP" "CRO" "APT" "LYXe" "VENOM" "EGLD"

Blockchains to include in the results. Exclude to return all.

pageNum
number >= 0
Default: 0

Page number for current request.

pageSize
number [ 1 .. 50 ]
Default: 30

Page size of results.

earliest
number
Default: 0

Filter projects, excluding those with their latest mint date before the passed
date. For example, passing a value Date.now() - 86400000 will only get those
with a mint date within the last 24 hours, as well as those in the future.


RESPONSES

200

A page of projects

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

get/projects
https://api.alphabot.app/v1/projects


REQUEST SAMPLES

 * Node

Copy

await fetch('//api.alphabot.app/v1/projects', {
  method: 'GET',
  headers: new Headers({
    Authorization: `Bearer ${API_KEY}`,
  }),
});


RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "projects": [
       * {
          * "_id": "string",
          * "name": "string",
          * "twitterUrl": "string",
          * "twitterId": "string",
          * "discordUrl": "string",
          * "osUrl": "string",
          * "twitterBannerImage": "string",
          * "twitterProfileImage": "string",
          * "mintDate": 0,
          * "hasMintDate": true,
          * "hasTime": true,
          * "supply": "string",
          * "wlPrice": "string",
          * "pubPrice": "string",
          * "blockchain": "string",
          * "dateCreated": 0,
          * "lastUpdated": 0,
          * "vetted": true,
          * "starCount": 0
         
         }
      
      ]
   
   }

}






GET SINGLE PROJECT

Retrieve a single project by ID or Twitter Username.

--------------------------------------------------------------------------------

Available to: 🔴User | 🟢Team

⚡️ Rate limited to 30 requests every hour

AUTHORIZATIONS:

bearerAuth

PATH PARAMETERS

id
required
string

ID or Twitter Username of the project to retrieve.


RESPONSES

200

A single project

400

Invalid request

401

Unauthorized. Valid API key required

429

Rate limit exceeded

default

Unexpected error

get/projects/{id}
https://api.alphabot.app/v1/projects/{id}


REQUEST SAMPLES

 * Node

Copy

await fetch('//api.alphabot.app/v1/projects/AlphabotApp', {
  method: 'GET',
  headers: new Headers({
    Authorization: `Bearer ${API_KEY}`,
  }),
});


RESPONSE SAMPLES

 * 200
 * 400
 * 401
 * 429
 * default

Content type
application/json
Copy
Expand all Collapse all
{
 * "success": true,
 * "data": {
    * "project": {
       * "_id": "string",
       * "name": "string",
       * "twitterUrl": "string",
       * "twitterId": "string",
       * "discordUrl": "string",
       * "osUrl": "string",
       * "twitterBannerImage": "string",
       * "twitterProfileImage": "string",
       * "mintDate": 0,
       * "hasMintDate": true,
       * "hasTime": true,
       * "supply": "string",
       * "wlPrice": "string",
       * "pubPrice": "string",
       * "blockchain": "string",
       * "dateCreated": 0,
       * "lastUpdated": 0,
       * "vetted": true,
       * "starCount": 0
      
      }
   
   }

}






WEBHOOKS

Webhooks are events sent as a POST request to the url configured by users in
their profile, and by teams on the team page

Webhooks allow real-time updates to be pushed to you directly from Alphabot for
both raffle and project modifications and status updates.


VALIDATING WEBHOOK REQUESTS

The body of a webhook request will contain an event name, a timestamp as well as
a verification hash which can be used to verify the request was sent by
Alphabot. This is done by comparing the hash sent in the webhook body to a
SHA256 hmac hex hash of the event name and timestamp concatenated with a
linebreak.

For example, using express and crypto in Node:

A basic working example you can fork can be found here

Copy

import crypto from 'crypto';
import express from 'express';

const app = express();

app.use(express.json());

app.post('/my-webhook', async (req, res) => {
 // Always respond 200
 res.status(200).send(undefined);

 // Store your API Key in an .env variable, *not* directly in your code!
 const hmac = crypto.createHmac('sha256', process.env.ALPHABOT_API_KEY);

 const result = hmac.update(`${req.body.event}\n${req.body.timestamp}`);

 const hashToCheck = result.digest('hex');

 if (hashToCheck !== req.body.hash) {
   // Invalid hash! Do not trust this request!
   console.warn('Invalid hash found!', req.socket.remoteAddress);
   return;
 }

 switch (req.body.event) {
   // Add your logic based on events
   // https://api.alphabot.app/v1#tag/Webhooks
   case 'raffle:active': {
     console.log('Raffle started!');
     break;
   }
 }
});

app.listen(process.env.PORT || 3000);



RAFFLE:ACTIVE


WEBHOOK EVENT

Sent when a raffle's status becomes active. Only active raffles will accept
entries.

🙋 For users, it will only be sent when the raffle has started would normally be
visible to the user on the website.

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🟢User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:active"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:active
https://api.alphabot.app/v1raffle:active


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:active",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "requirePremium": true,
       * "connectDiscord": true,
       * "connectTwitter": true,
       * "connectWallet": true,
       * "connectEmail": true,
       * "connectTelegram": true,
       * "connectPassword": true,
       * "connectCaptcha": true,
       * "signWallet": true,
       * "excludePreviousWinners": true,
       * "requiredEth": 0,
       * "requiredTokens": [
          * {
             * "address": "string",
             * "name": "string",
             * "openseaSlug": "string",
             * "isMultiplier": true
            
            }
         
         ],
       * "discordServerRoles": [
          * {
             * "id": "string",
             * "label": "string",
             * "inviteLink": "string",
             * "exclude": true,
             * "roles": [
                * {
                   * "roleId": "string",
                   * "val": 0,
                   * "name": "string",
                   * "stacking": true
                  
                  }
               
               ]
            
            }
         
         ],
       * "twitterFollows": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string"
            
            }
         
         ],
       * "twitterRetweet": "string",
       * "twitterRetweetType": "rt"
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:CREATED


WEBHOOK EVENT

Sent when a raffle is first created, regardless of status. Only active status
raffles will accept entries.

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:created"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:created
https://api.alphabot.app/v1raffle:created


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:created",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "requirePremium": true,
       * "connectDiscord": true,
       * "connectTwitter": true,
       * "connectWallet": true,
       * "connectEmail": true,
       * "connectTelegram": true,
       * "connectPassword": true,
       * "connectCaptcha": true,
       * "signWallet": true,
       * "excludePreviousWinners": true,
       * "requiredEth": 0,
       * "requiredTokens": [
          * {
             * "address": "string",
             * "name": "string",
             * "openseaSlug": "string",
             * "isMultiplier": true
            
            }
         
         ],
       * "discordServerRoles": [
          * {
             * "id": "string",
             * "label": "string",
             * "inviteLink": "string",
             * "exclude": true,
             * "roles": [
                * {
                   * "roleId": "string",
                   * "val": 0,
                   * "name": "string",
                   * "stacking": true
                  
                  }
               
               ]
            
            }
         
         ],
       * "twitterFollows": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string"
            
            }
         
         ],
       * "twitterRetweet": "string",
       * "twitterRetweetType": "rt"
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:EDITED


WEBHOOK EVENT

Sent when a raffle is edited.

🙋 For users, it will only be sent when the raffle has started would normally be
visible to the user on the website.

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🟢User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:edited"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:edited
https://api.alphabot.app/v1raffle:edited


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:edited",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "requirePremium": true,
       * "connectDiscord": true,
       * "connectTwitter": true,
       * "connectWallet": true,
       * "connectEmail": true,
       * "connectTelegram": true,
       * "connectPassword": true,
       * "connectCaptcha": true,
       * "signWallet": true,
       * "excludePreviousWinners": true,
       * "requiredEth": 0,
       * "requiredTokens": [
          * {
             * "address": "string",
             * "name": "string",
             * "openseaSlug": "string",
             * "isMultiplier": true
            
            }
         
         ],
       * "discordServerRoles": [
          * {
             * "id": "string",
             * "label": "string",
             * "inviteLink": "string",
             * "exclude": true,
             * "roles": [
                * {
                   * "roleId": "string",
                   * "val": 0,
                   * "name": "string",
                   * "stacking": true
                  
                  }
               
               ]
            
            }
         
         ],
       * "twitterFollows": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string"
            
            }
         
         ],
       * "twitterRetweet": "string",
       * "twitterRetweetType": "rt"
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:ENDED


WEBHOOK EVENT

Sent when a raffle is ended.

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:ended"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:ended
https://api.alphabot.app/v1raffle:ended


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:ended",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "requirePremium": true,
       * "connectDiscord": true,
       * "connectTwitter": true,
       * "connectWallet": true,
       * "connectEmail": true,
       * "connectTelegram": true,
       * "connectPassword": true,
       * "connectCaptcha": true,
       * "signWallet": true,
       * "excludePreviousWinners": true,
       * "requiredEth": 0,
       * "requiredTokens": [
          * {
             * "address": "string",
             * "name": "string",
             * "openseaSlug": "string",
             * "isMultiplier": true
            
            }
         
         ],
       * "discordServerRoles": [
          * {
             * "id": "string",
             * "label": "string",
             * "inviteLink": "string",
             * "exclude": true,
             * "roles": [
                * {
                   * "roleId": "string",
                   * "val": 0,
                   * "name": "string",
                   * "stacking": true
                  
                  }
               
               ]
            
            }
         
         ],
       * "twitterFollows": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string"
            
            }
         
         ],
       * "twitterRetweet": "string",
       * "twitterRetweetType": "rt"
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:FINALIZED


WEBHOOK EVENT

Sent when a raffle is finalized. This hook is unique in that it includes the
winner data on the raffle object

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:finalized"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:finalized
https://api.alphabot.app/v1raffle:finalized


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:finalized",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "winners": [
          * {
             * "userId": "string",
             * "slug": "string",
             * "mintAddress": "string",
             * "email": "string",
             * "discordId": "string",
             * "discordName": "string",
             * "twitterId": "string",
             * "twitterName": "string",
             * "telegramId": "string",
             * "telegramName": "string",
             * "image": "string",
             * "createdDate": 0,
             * "entries": 0,
             * "tokensEntries": 0,
             * "discordEntries": 0,
             * "source": "discord",
             * "lossMultipliedEntries": 0,
             * "answers": {
                * "questionId": 0,
                * "answer": "string"
               
               },
             * "applicationCode": "string",
             * "approved": true,
             * "approvedOn": 0,
             * "approvedBy": "string",
             * "winnerImage": "string",
             * "winner": true,
             * "premium": true,
             * "extraEntry": true,
             * "picked": 0,
             * "raffleId": "string",
             * "projectId": "string",
             * "teamId": "string"
            
            }
         
         ]
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:DELETED


WEBHOOK EVENT

Sent when a raffle is deleted. Raffles cannot be deleted after they are
finalized.

🙋 For users, it will only be sent when the raffle has started would normally be
visible to the user on the website.

👥 For teams, it will be sent if the raffle is created by the team, or is
associated to the team's project. Teams will also receive this event for all
'Public' visibility raffles.

--------------------------------------------------------------------------------

Sends to: 🟢User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:deleted"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:deleted
https://api.alphabot.app/v1raffle:deleted


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:deleted",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string",
       * "requirePremium": true,
       * "connectDiscord": true,
       * "connectTwitter": true,
       * "connectWallet": true,
       * "connectEmail": true,
       * "connectTelegram": true,
       * "connectPassword": true,
       * "connectCaptcha": true,
       * "signWallet": true,
       * "excludePreviousWinners": true,
       * "requiredEth": 0,
       * "requiredTokens": [
          * {
             * "address": "string",
             * "name": "string",
             * "openseaSlug": "string",
             * "isMultiplier": true
            
            }
         
         ],
       * "discordServerRoles": [
          * {
             * "id": "string",
             * "label": "string",
             * "inviteLink": "string",
             * "exclude": true,
             * "roles": [
                * {
                   * "roleId": "string",
                   * "val": 0,
                   * "name": "string",
                   * "stacking": true
                  
                  }
               
               ]
            
            }
         
         ],
       * "twitterFollows": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string"
            
            }
         
         ],
       * "twitterRetweet": "string",
       * "twitterRetweetType": "rt"
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


RAFFLE:WON


WEBHOOK EVENT

Sent to users when they win a raffle and it is finalized.

--------------------------------------------------------------------------------

Sends to: 🟢User | 🔴Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "raffle:won"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postraffle:won
https://api.alphabot.app/v1raffle:won


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "raffle:won",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "raffle": {
       * "_id": "string",
       * "slug": "string",
       * "name": "string",
       * "type": "raffle",
       * "status": "draft",
       * "visibility": "public",
       * "description": "string",
       * "startDate": 0,
       * "endDate": 0,
       * "winnerCount": 0,
       * "bannerImageUrl": "string",
       * "blockchain": "ETH",
       * "twitterUrl": "string",
       * "discordUrl": "string",
       * "entryCount": 0,
       * "reqString": "string",
       * "projectId": "string",
       * "teamId": "string"
      
      },
    * "entry": {
       * "userId": "string",
       * "slug": "string",
       * "mintAddress": "string",
       * "email": "string",
       * "discordId": "string",
       * "discordName": "string",
       * "twitterId": "string",
       * "twitterName": "string",
       * "telegramId": "string",
       * "telegramName": "string",
       * "image": "string",
       * "createdDate": 0,
       * "entries": 0,
       * "tokensEntries": 0,
       * "discordEntries": 0,
       * "source": "discord",
       * "lossMultipliedEntries": 0,
       * "answers": {
          * "questionId": 0,
          * "answer": "string"
         
         },
       * "applicationCode": "string",
       * "approved": true,
       * "approvedOn": 0,
       * "approvedBy": "string",
       * "winnerImage": "string",
       * "winner": true,
       * "premium": true,
       * "extraEntry": true,
       * "picked": 0,
       * "raffleId": "string",
       * "projectId": "string",
       * "teamId": "string"
      
      }
   
   }

}


PROJECT:ADDED


WEBHOOK EVENT

Sent when a project has been added within Alphabot

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "project:added"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postproject:added
https://api.alphabot.app/v1project:added


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "project:added",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "project": {
       * "_id": "string",
       * "name": "string",
       * "twitterUrl": "string",
       * "twitterId": "string",
       * "discordUrl": "string",
       * "osUrl": "string",
       * "twitterBannerImage": "string",
       * "twitterProfileImage": "string",
       * "mintDate": 0,
       * "hasMintDate": true,
       * "hasTime": true,
       * "supply": "string",
       * "wlPrice": "string",
       * "pubPrice": "string",
       * "blockchain": "string",
       * "dateCreated": 0,
       * "lastUpdated": 0,
       * "vetted": true,
       * "starCount": 0
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


PROJECT:EDITED


WEBHOOK EVENT

Sent when a project has been edited within Alphabot

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "project:edited"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postproject:edited
https://api.alphabot.app/v1project:edited


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "project:edited",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "project": {
       * "_id": "string",
       * "name": "string",
       * "twitterUrl": "string",
       * "twitterId": "string",
       * "discordUrl": "string",
       * "osUrl": "string",
       * "twitterBannerImage": "string",
       * "twitterProfileImage": "string",
       * "mintDate": 0,
       * "hasMintDate": true,
       * "hasTime": true,
       * "supply": "string",
       * "wlPrice": "string",
       * "pubPrice": "string",
       * "blockchain": "string",
       * "dateCreated": 0,
       * "lastUpdated": 0,
       * "vetted": true,
       * "starCount": 0
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


PROJECT:REMOVED


WEBHOOK EVENT

Sent when a project was removed within Alphabot

--------------------------------------------------------------------------------

Sends to: 🔴User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "project:removed"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postproject:removed
https://api.alphabot.app/v1project:removed


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "project:removed",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "project": {
       * "_id": "string",
       * "name": "string",
       * "twitterUrl": "string",
       * "twitterId": "string",
       * "discordUrl": "string",
       * "osUrl": "string",
       * "twitterBannerImage": "string",
       * "twitterProfileImage": "string",
       * "mintDate": 0,
       * "hasMintDate": true,
       * "hasTime": true,
       * "supply": "string",
       * "wlPrice": "string",
       * "pubPrice": "string",
       * "blockchain": "string",
       * "dateCreated": 0,
       * "lastUpdated": 0,
       * "vetted": true,
       * "starCount": 0
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


PROJECT:MINTING


WEBHOOK EVENT

Sent when a project's mint time is approaching, normally around 15 minutes
before

--------------------------------------------------------------------------------

Sends to: 🟢User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "project:minting"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postproject:minting
https://api.alphabot.app/v1project:minting


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "project:minting",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "project": {
       * "_id": "string",
       * "name": "string",
       * "twitterUrl": "string",
       * "twitterId": "string",
       * "discordUrl": "string",
       * "osUrl": "string",
       * "twitterBannerImage": "string",
       * "twitterProfileImage": "string",
       * "mintDate": 0,
       * "hasMintDate": true,
       * "hasTime": true,
       * "supply": "string",
       * "wlPrice": "string",
       * "pubPrice": "string",
       * "blockchain": "string",
       * "dateCreated": 0,
       * "lastUpdated": 0,
       * "vetted": true,
       * "starCount": 0
      
      },
    * "user": {
       * "_id": "string",
       * "address": "string",
       * "connections": [
          * {
             * "id": "string",
             * "name": "string",
             * "image": "string",
             * "provider": "discord"
            
            }
         
         ]
      
      }
   
   }

}


WEBHOOK:TEST


WEBHOOK EVENT

Sent to test the webhoook when a webhook URL is set. Must return a 200 status
code for the URL change to be applied.

--------------------------------------------------------------------------------

Sends to: 🟢User | 🟢Team

REQUEST BODY SCHEMA: APPLICATION/JSON



event
required
string
Value: "webhook:test"

timestamp
required
number

Timestamp the webhook was sent, as ms epoch

hash
required
string

Hash to verify legitimacy of the webhook request. See the API documentation for
an example.

data
required
object


postwebhook:test
https://api.alphabot.app/v1webhook:test


REQUEST SAMPLES

 * Payload

Content type
application/json
Copy
Expand all Collapse all
{
 * "event": "webhook:test",
 * "timestamp": 0,
 * "hash": "string",
 * "data": {
    * "test": {
       * "foo": "bar"
      
      }
   
   }

}


CHANGELOG


V1.0.3

 * * Increasing rate limit bandwidth to 100 requests per 5 mins for /register
     endpoint.


V1.0.2

 * * Added entry data for current user-specific entry to the raffle:won
     webhook,- - Added entry data for users requesting the Get Single Raffle
     endpoint


V1.0.1

 * * Added earliest query parameter to the Get projects list endpoint