Create Presale

Create presales with configurable parameters like name, description, start and end timestamp, and token info.


POSTapi.metal.build/merchant/presale

Create a presale

This endpoint allows you to create a new presale.


Request attributes

  • Name
    name
    Type
    string
    Description

    The name for your presale (e.g., "Test Token"). Required

  • Name
    description
    Type
    string
    Description

    A brief description of your presale (e.g., "This is a test presale"). Required

  • Name
    startTimestamp
    Type
    number
    Description

    The UNIX timestamp when the presale starts. Required

  • Name
    endTimestamp
    Type
    number
    Description

    The UNIX timestamp when the presale ends. Required

  • Name
    tokenInfo
    Type
    object
    Description
    • Name
      name
      Type
      string
      Description
      The name of the token associated with the presale. Required
    • Name
      symbol
      Type
      string
      Description
      The symbol of the token associated with the presale. Required
    • Name
      imageUrl
      Type
      string
      Description
      The URL of the token image. Required
    • Name
      metadata
      Type
      object
      Description
      • Name
        description
        Type
        string
        Description
        A description of the token.
      • Name
        telegramLink
        Type
        string
        Description
        Telegram link for the token.
      • Name
        websiteLink
        Type
        string
        Description
        Website link for the token.
      • Name
        xLink
        Type
        string
        Description
        X (formerly Twitter) link for the token.
      • Name
        farcasterLink
        Type
        string
        Description
        Farcaster link for the token.

Request

POST
api.metal.build/merchant/presale
const response = await fetch('https://api.metal.build/merchant/presale', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_SECRET_API_KEY',
  },
  body: JSON.stringify({
    "name": "Test Presale 1",
    "description": "This is a test presale 1",
    "startTimestamp": 1748352156,
    "endTimestamp": 1748352456,
    "tokenInfo": {
      "name": "Test Presale Token 1",
      "symbol": "TPT1",
      "imageUrl": "https://ipfs.io/ipfs/QmP4Bm9VWhGoqc9DLb6Bu1y5XdFXoEnw48KCnKxePxAUcU",
      "metadata": {
        "description": "",
        "telegramLink": "",
        "websiteLink": "",
        "xLink": "",
        "farcasterLink": ""
      }
    }
  }),
})

const token = await response.json()

Response

{
  "presale": {
    "signerId": "6835bc6ee735049615435549",
    "orgId": "6813d8b83531f78992d479f6",
    "id": "81ce774a-ebaf-4d19-ba77-b1dbb41bc5d1",
    "name": "Test Presale 1",
    "description": "This is a test presale 1",
    "startTimestamp": 1748352156,
    "endTimestamp": 1748352456,
    "chainId": 8453,
    "status": "completed",
    "participants": [],
    "tokenInfo": {
      "name": "Test Presale Token 1",
      "symbol": "TPT1",
      "imageUrl": "https://ipfs.io/ipfs/QmP4Bm9VWhGoqc9DLb6Bu1y5XdFXoEnw48KCnKxePxAUcU",
      "metadata": {
        "description": "",
        "telegramLink": "",
        "websiteLink": "",
        "xLink": "",
        "farcasterLink": ""
      }
    },
    "createdAt": "2025-05-27T13:21:54.064Z",
  }
}

Was this page helpful?