# Create issuer Profile

This creates a issuer profile using method. The weightage for this API is 10

## API Specification

## Create issuer profile

<mark style="color:green;">`POST`</mark> `https://api.krypcore.com/api/v0/did/createIssuerProfile`

Creates a new issuer profile 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               |
| --------------------------------------------------- | ------ | ------------------------- |
| issuerDesgination<mark style="color:red;">\*</mark> | String | desgination of the issuer |
| issuerDescription<mark style="color:red;">\*</mark> | String | Description of issuer     |
| issuerName<mark style="color:red;">\*</mark>        | String | The name of the issuer    |
| method<mark style="color:red;">\*</mark>            | String | method type               |

{% tabs %}
{% tab title="200: OK DID successfully created" %}

```javascript
{
    Data: "did:key:z6Mkfm8bqp23Q5629bnmzL26ksvfMgfFUA9hWpZ1dWjpARsQ",
    Message: "Issuer Profile Created",
    Status: "SUCCESS"
}
```

{% endtab %}

{% tab title="500: Internal Server Error mandatory params are missing" %}

```javascript
{
    Data: null,
    Message: "mandatory params missing",
    Status: "FAILURE"
}
```

{% 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 --request POST 'https://api.krypcore.com/api/v0/did/createIssuerProfile' \
--header 'Authorization: xxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "issuerDescription": "xxx",
  "issuerDesignation": "xxx",
  "issuerName": "issuer",
  "method": "key"
}'
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "issuerDescription": "xxx",
  "issuerDesignation": "xxx",
  "issuerName": "issuer",
  "method": "key"
});

var config = {
  method: 'post',
  url: 'https://api.krypcore.com/api/v0/did/createIssuerProfile',
  headers: { 
    'Authorization': 'xxxxxxxxxxxxxxx', 
    'DappId': 'xxxxxxxxxxxxxxx', 
    'Content-Type': 'application/json'
  },
  data : data
};

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

```

{% endtab %}

{% tab title="Python " %}

```python
import requests
import json

url = "https://api.krypcore.com/api/v0/did/createIssuerProfile"

payload = json.dumps({
  "issuerDescription": "xxx",
  "issuerDesignation": "xxx",
  "issuerName": "issuer",
  "method": "key"
})
headers = {
  'Authorization': 'xxxxxxxxxxxxxxx',
  'DappId': 'xxxxxxxxxxxxxxx',
  '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/did/createIssuerProfile"
  method := "POST"

  payload := strings.NewReader(`{
  "issuerDescription": "xxx",
  "issuerDesignation": "xxx",
  "issuerName": "issuer",
  "method": "key"
}`)

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "xxxxxxxxxxxxxxx")
  req.Header.Add("DappId", "xxxxxxxxxxxxxxx")
  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/did-manager-apis/create-issuer-profile.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.
