Create Drop Request
Schema for creating new drops in the Intraverse Backend API v2.
Description
The Create Drop Request schema defines the structure of requests for creating new NFT drops. This includes all the configuration, metadata, and smart contract details needed to set up a new drop.
Class Validator Schema
import { IsArray, IsBoolean, IsEnum, IsNumber, IsOptional, IsString, MinLength, ValidateNested } from "class-validator";
import { Type } from "class-transformer";
import { MintPhaseDto } from "./MintPhaseDto";
import { MarketPlaceDto } from "./MarketPlaceDto";
import { RarityDto } from "./RarityDto";
import { DropNetwork } from "../models/drop";
export class CreateDropRequestPayload {
@IsString()
organizationId: string;
@IsString()
@MinLength(3)
name: string;
@IsString()
description: string;
@IsString()
contractAddress: string;
@IsString()
chain: string;
@IsString()
@IsEnum(DropNetwork)
network: DropNetwork;
@IsNumber()
chainId: number;
@IsString()
logo: string;
@IsString()
collectionImage: string;
@IsString()
moreInfoUrl: string;
@IsNumber()
startDate: number;
@IsNumber()
endDate: number;
@IsString()
@IsOptional()
magicEdenGoldTokenName: string | null;
@IsBoolean()
whitelistEnabled: boolean;
@IsArray()
@ValidateNested({ each: true })
@Type(() => RarityDto)
cards: RarityDto[];
@IsArray()
@ValidateNested({ each: true })
@Type(() => MarketPlaceDto)
marketplaces: MarketPlaceDto[];
@IsArray()
@ValidateNested({ each: true })
@Type(() => MintPhaseDto)
phases: MintPhaseDto[];
@IsString()
signerPrivateKey: string;
@IsBoolean()
hasMultipleContracts: boolean;
@IsBoolean()
hasDailyCheckIn: boolean;
@IsBoolean()
isVIP: boolean;
@IsBoolean()
isActive: boolean;
}
TypeScript Type
interface CreateDropRequestPayload {
organizationId: string;
name: string;
description: string;
contractAddress: string;
chain: string;
network: DropNetwork;
chainId: number;
logo: string;
collectionImage: string;
moreInfoUrl: string;
startDate: number;
endDate: number;
magicEdenGoldTokenName?: string | null;
whitelistEnabled: boolean;
cards: RarityDto[];
marketplaces: MarketPlaceDto[];
phases: MintPhaseDto[];
signerPrivateKey: string;
hasMultipleContracts: boolean;
hasDailyCheckIn: boolean;
isVIP: boolean;
isActive: boolean;
}
Example Request
{
"organizationId": "org-123",
"name": "Bored Ape Yacht Club",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs",
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e0a6a9c8d0c0b0a",
"chain": "ethereum",
"network": "mainnet",
"chainId": 1,
"logo": "https://example.com/logo.png",
"collectionImage": "https://example.com/collection.png",
"moreInfoUrl": "https://boredapeyachtclub.com",
"startDate": 1640995200000,
"endDate": 1641081600000,
"magicEdenGoldTokenName": null,
"whitelistEnabled": true,
"cards": [
{
"id": "rarity-1",
"name": "Common",
"probability": 0.7,
"maxSupply": 7000
}
],
"marketplaces": [
{
"id": "marketplace-1",
"name": "OpenSea",
"url": "https://opensea.io"
}
],
"phases": [
{
"id": "phase-1",
"name": "Whitelist",
"startDate": 1640995200000,
"endDate": 1641081600000
}
],
"signerPrivateKey": "0x1234567890abcdef...",
"hasMultipleContracts": false,
"hasDailyCheckIn": false,
"isVIP": false,
"isActive": true
}
Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization identifier |
name | string | Yes | Drop name (minimum 3 characters) |
description | string | Yes | Detailed description of the drop |
contractAddress | string | Yes | Smart contract address |
chain | string | Yes | Blockchain chain name |
network | DropNetwork | Yes | Network type (mainnet, testnet, etc.) |
chainId | number | Yes | Blockchain chain ID |
logo | string | Yes | URL to the drop logo image |
collectionImage | string | Yes | URL to the collection image |
moreInfoUrl | string | Yes | URL for additional information |
startDate | number | Yes | Drop start timestamp in milliseconds |
endDate | number | Yes | Drop end timestamp in milliseconds |
magicEdenGoldTokenName | string | No | Magic Eden gold token name if applicable |
whitelistEnabled | boolean | Yes | Whether whitelist is enabled |
cards | RarityDto[] | Yes | Array of rarity tier definitions |
marketplaces | MarketPlaceDto[] | Yes | Supported marketplace information |
phases | MintPhaseDto[] | Yes | Minting phase definitions |
signerPrivateKey | string | Yes | Private key for contract signing |
hasMultipleContracts | boolean | Yes | Whether the drop has multiple contracts |
hasDailyCheckIn | boolean | Yes | Whether daily check-in is required |
isVIP | boolean | Yes | Whether this is a VIP-only drop |
isActive | boolean | Yes | Whether the drop is active |
DropNetwork Enum
enum DropNetwork {
MAINNET = "mainnet",
TESTNET = "testnet",
DEVNET = "devnet",
}
Validation Rules
- name: Minimum 3 characters
- startDate: Must be a valid timestamp
- endDate: Must be after startDate
- cards: Must be a non-empty array
- marketplaces: Must be a non-empty array
- phases: Must be a non-empty array
- signerPrivateKey: Must be a valid private key
API Endpoint
This schema is used by the following endpoint:
POST /v2/drop- Create new drop
Authentication
This endpoint requires dual authentication:
User Authentication
- JWT Bearer Token:
Authorization: Bearer <jwt_token> - Purpose: Identifies the authenticated user
- Scope: User must have valid authentication
Game Authentication
- Game Key Header:
x-game-key: <client_key>orx-game-server-key: <server_key> - Purpose: Identifies the game/application making the request
- Validation: Game key must be valid and active
Example Request Headers
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"x-game-key": "your-game-client-key"
}
Response Format
The endpoint returns a DropDto object:
interface DropDto {
// See DropDto schema for complete structure
}