Skip to content

Creating a Moment

This page documents the API endpoint for creating a new Moment on the In Process protocol. No signature is required for this endpoint.

Note: You can view the collective timeline by browsing the timeline.

Endpoint

POST https://inprocess.fun/api/moment/create

Request Body

Send a JSON object with the following fields:

{
  "contract": {
    "name": "string", // Name of the contract
    "uri": "string" // Metadata URI for the contract (e.g., Arweave URI)
  },
  "token": {
    "tokenMetadataURI": "string", // Metadata URI for the token (e.g., Arweave URI)
    "createReferral": "string", // Referral recipient address
    "salesConfig": {
      "type": "string",
      "pricePerToken": "string",
      "saleStart": 1717200000,
      "saleEnd": 18446744073709551615
    }, // Sales configuration object
    "mintToCreatorCount": 1 // Number of tokens to mint to creator (usually 1)
  },
  "account": "string" // Creator's address
}

Example Request

cURL
curl -X POST https://inprocess.fun/api/moment/create \
  -H "Content-Type: application/json" \
  -d '{
    "contract": {
      "name": "My Music Moment",
      "uri": "https://arweave.net/abc123"
    },
    "token": {
      "tokenMetadataURI": "https://arweave.net/abc123",
      "createReferral": "0xReferralAddress",
      "salesConfig": {
        "type": "fixedPrice",
        "pricePerToken": "100000000000000000", // 0.1 ETH in wei (18 decimals)
        "saleStart": 1717200000,
        "saleEnd": 18446744073709551615
      },
      "mintToCreatorCount": 1
    },
    "account": "0xCreatorAddress"
  }'

Example Response

{
  "contractAddress": "0xContractAddress",
  "tokenId": "1",
  "hash": "0xTransactionHash"
}

To learn more about SalesConfig, go to salesConfig Reference