Skip to content

Create a Collection

This page documents the API endpoint for creating a new Collection on the In Process protocol. This endpoint allows artists to create a new collection contract onchain.

Note: The collection is created onchain via a smart account transaction.

Endpoint

POST https://inprocess.world/api/collections

Request Body

Send a JSON object with the following fields:

{
  "account": "string", // Creator's address (will be used as default admin)
  "name": "string", // Name of the Collection
  "uri": "string", // Metadata URI for the Collection (e.g., Arweave URI)
  "splits": [
    // Optional: Revenue sharing configuration
    {
      "address": "string", // Recipient address
      "percentAllocation": 60 // Allocation percentage (0-100)
    },
    {
      "address": "string", // Recipient address
      "percentAllocation": 40 // Allocation percentage (0-100)
    }
  ] // Optional: Must have at least 2 recipients and sum to 100% if provided
}

Body Parameters

NameTypeRequiredDescription
accountstringYesThe creator's address (will be set as the default admin of the collection)
namestringYesThe name of the Collection
uristringYesThe metadata URI for the Collection (e.g., Arweave URI)
splitsarrayNoRevenue sharing configuration. If provided, must have at least 2 recipients and sum to 100%
splits[].addressstringYes*Recipient address for revenue sharing (required if splits is provided)
splits[].percentAllocationnumberYes*Allocation percentage (0-100) for this recipient (required if splits is provided)

* Required if splits array is provided

Example Requests

cURL
curl -X POST https://inprocess.world/api/collections \
 -H "Content-Type: application/json" \
 -d '{
"account": "0x1234567890123456789012345678901234567890",
"name": "My Collection",
"uri": "ar://collection-metadata-uri"
}'

Example Request with Splits

If you want to configure revenue sharing, include the splits array:

cURL
curl -X POST https://inprocess.world/api/collections \
  -H "Content-Type: application/json" \
  -d '{
    "account": "0x1234567890123456789012345678901234567890",
    "name": "My Collection",
    "uri": "ar://collection-metadata-uri",
    "splits": [
      {
        "address": "0x1111111111111111111111111111111111111111",
        "percentAllocation": 60
      },
      {
        "address": "0x2222222222222222222222222222222222222222",
        "percentAllocation": 40
      }
    ]
  }'

Example Success Response

{
  "contractAddress": "0xNewCollectionContractAddress",
  "hash": "0xTransactionHash",
  "chainId": 8453
}

Response Fields

NameTypeDescription
contractAddressstringThe address of the newly created Collection
hashstringTransaction hash of the creation operation
chainIdnumberChain ID where the transaction was executed

Example Error Response

If an error occurs (e.g., invalid input or transaction failure), the API returns:

Validation Error

{
  "message": "Invalid input",
  "errors": [
    {
      "field": "name",
      "message": "Collection name is required"
    }
  ]
}

Splits Validation Error

{
  "message": "Invalid input",
  "errors": [
    {
      "field": "splits",
      "message": "Splits total percentage must equal 100%"
    }
  ]
}

Server Error

{
  "message": "Failed to create collection"
}

Notes

  • The collection is created onchain via a smart account transaction
  • The transaction is processed using Coinbase CDP (Coinbase Developer Platform)
  • The account address will be set as the default admin of the collection
  • If splits are provided, they must have at least 2 recipients and the total percentage allocation must equal 100%
  • The collection is created without any moments - you can create moments separately after the collection is created
  • Split addresses can be regular addresses or smart wallet addresses (they will be resolved automatically)