DocsGetting StartedAPI ReferenceCopyright Mint

CopyMint NFT API

Initiate the CopyMint process for a new C2LC NFT through the `/v1/cl2c/copymint` endpoint.

⚠️ This content is not available in your language yet.

The POST /v1/cl2c/copymint endpoint allows you to initiate the CopyMint process for a new C2LC NFT.

Endpoint

POST
/v1/cl2c/copymint
Initiate the CopyMint of a new C2LC NFT.

Parameters

NameTypeLocationRequiredDescription
tenantstringHeaderYesTenant ID for accessing this API.
X-API-KeystringHeaderYesAPI Key ID for accessing this API.

Request Body

Content Type: application/json

Example Request Body

{
  "name": "My First NFT",
  "description": "This is an example NFT.",
  "image": "https://example.com/image.png",
  "smartContractId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "cL2CUserId": "user-12345"
}

Responses

Success (200)

Content Type: application/json

The response will return the ID of the newly minted NFT.

Example Response

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Error Responses

For errors, ensure to check the status codes and messages returned in the response body, typically formatted as JSON. Error details will help in diagnosing issues with the request, such as invalid parameters or authentication failures.

Code Samples

Usage in Different Frameworks

Node.js Example

const axios = require('axios');
 
const requestBody = {
  name: "My First NFT",
  description: "This is an example NFT.",
  image: "https://example.com/image.png",
  smartContractId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  cL2CUserId: "user-12345"
};
 
axios.post('https://api.example.com/v1/cl2c/copymint', requestBody, {
  headers: {
    'tenant': 'your-tenant-id',
    'X-API-Key': 'your-api-key'
  }
})
.then(response => console.log(response.data))
.catch(error => console.error(error.response.data));