# Mint ERC20 Token

ERC20 Token can be minted using this method. The weightage for this API is 5

## API Specification

## Mint ERC20 Token

<mark style="color:green;">`POST`</mark> `https://api.krypcore.com/api/v0/ft-manager/mintFT`

ERC20 Token can be minted  under the given instance.&#x20;

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User Auth Key obtained from Dash |
| DappId<mark style="color:red;">\*</mark>        | String | DappId                           |

#### Request Body

| Name                                                         | Type   | Description                            |
| ------------------------------------------------------------ | ------ | -------------------------------------- |
| contractAddress<mark style="color:red;">\*</mark>            | String | Contract Address                       |
| chainId<mark style="color:red;">\*</mark>                    | String | Chain ID                               |
| custodialWalletAccessToken<mark style="color:red;">\*</mark> | String | Wallet Access Token Of Custodial Token |
| erc<mark style="color:red;">\*</mark>                        | String | Erc Standard                           |
| quantity<mark style="color:red;">\*</mark>                   | String | Quantity                               |
| recipientAddress<mark style="color:red;">\*</mark>           | String | Recipient Address                      |
| walletType<mark style="color:red;">\*</mark>                 | String | type of wallet                         |

{% tabs %}
{% tab title="200: OK FT got minted" %}

```javascript
{
    Data: {
        referenceId: "59acb0fc-6da0-4322-9a66-9f2f35d584a0",
        txnHash: ""
    },
    Message: "FT got minted successfully",
    Status: "SUCCESS"
}
```

{% endtab %}

{% tab title="401: Unauthorized Failure in authentication" %}

```javascript
{
  Status: 'FAILURE',
  Code: 401,
  Message: 'subId with apiKey not matching'
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```bash
curl --location 'https://api.krypcore.com/api/v0/ft-manager/mintFT' \
--header 'Authorization: xxxxxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxxxxx' \
--header 'ChainId: xxxx' \
--header 'Content-Type: application/json' \
--data '{
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "22f82362-2403-453b-b6ed-61ded8b22796",
  "erc": "ERC20",
  "quantity": "10000",
  "recipientAddress": "0x466e1862CFC80F216dc4126cc883D731520f36DE",
  "walletType": "non-custodial"
}'
```

{% endtab %}

{% tab title="Node.js (Fetch)" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "22f82362-2403-453b-b6ed-61ded8b22796",
  "erc": "ERC20",
  "quantity": "10000",
  "recipientAddress": "0x466e1862CFC80F216dc4126cc883D731520f36DE",
  "walletType": "non-custodial"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.krypcore.com/api/v0/ft-manager/mintFT',
  headers: { 
    'Authorization': 'xxxxxxxxxxxxxxxxxx', 
    'DappId': 'xxxxxxxxxxxxxxxxxx', 
    'ChainId': 'xxxx',
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python " %}

```python
import requests
import json

url = "https://api.krypcore.com/api/v0/ft-manager/mintFT"

payload = json.dumps({
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "22f82362-2403-453b-b6ed-61ded8b22796",
  "erc": "ERC20",
  "quantity": "10000",
  "recipientAddress": "0x466e1862CFC80F216dc4126cc883D731520f36DE",
  "walletType": "non-custodial"
})
headers = {
  'Authorization': 'xxxxxxxxxxxxxxxxxx',
  'DappId': 'xxxxxxxxxxxxxxxxxx',
  'ChainId': 'xxxx',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.krypcore.com/api/v0/ft-manager/mintFT"
  method := "POST"

  payload := strings.NewReader(`{
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "22f82362-2403-453b-b6ed-61ded8b22796",
  "erc": "ERC20",
  "quantity": "10000",
  "recipientAddress": "0x466e1862CFC80F216dc4126cc883D731520f36DE",
  "walletType": "non-custodial"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "xxxxxxxxxxxxxxxxxx")
  req.Header.Add("DappId", "xxxxxxxxxxxxxxxxxx")
  req.Header.Add("ChainId", "xxxx")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.krypcore.com/dev-docs/api-reference/core-service-apis/ft-manager-apis/mint-erc20-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
