Create mint requests
Mint items using the Phosphor API.
Before you can mint items, you must:
- Create a collection.
- Configure the collection contract.
- Wait for the smart contract to be deployed.
- Lock the items you want to mint.
Issue a POST to the mint-requests endpoint to create one or more mint requests.
POST https://admin-api.phosphor.xyz/v1/mint-requests
The request returns the transaction details of the newly created requests. There are five ways to specify items to mint:
- item_id- Mint a single item.
- item_ids- Mint a list of items by their IDs.
- collection_id- Mint all locked and un-minted items in a collection. Reserved items (email claims and listings) are not considered when minting.
- collection_idand- token_ids- Mint a list of items by their token IDs.
- collection_idand- token_ranges- Mint a list of items by token ranges.
You must specify the address (to_address) receiving the newly minted items.
You can mint a maximum of 100 items in a single request. When passing collection_id, only the first 100 are considered. Make multiple requests if you need to mint more than 100 items.
- item_id
- item_ids
- collection_id
- collection_id and token_id
- collection_id and token_ranges
{
  "quantity": 1,
  "to_address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "item_id": "3fa85f64-5717-4562-b3fc-2c963f66afa8"
}
{
  "quantity": 1,
  "to_address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "item_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa8",
    "3fa85f64-5717-4562-b3fc-2c963f66afa9"
  ]
}
{
  "quantity": 1,
  "to_address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "collection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
{
  "quantity": 1,
  "to_address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "collection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "token_ids": ["1", "5"]
}
{
  "quantity": 1,
  "to_address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "collection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "token_ranges": [
    {
      "from_id": "1",
      "to_id": "5"
    },
    {
      "from_id": "7",
      "to_id": "8"
    },
    {
      "from_id": "9",
      "to_id": "9"
    }
  ]
}