# Update Pin status

This allows Pin status to be updated. The weightage for this API is `10`

## API Specification

## Update Pin status

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

This allows Pin status to be updated to false 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               |
| ------------------------------------ | ------ | ------------------------- |
| id<mark style="color:red;">\*</mark> | string | storage ID from Dashboard |

{% tabs %}
{% tab title="200: OK Successfully updated" %}

```javascript
{
    "Data": null,
    "Message": "pin status updated successfully",
    "Status": "SUCCESS"
}
```

{% 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/storagemanageripfs/updatePinStatus' \
--header 'Authorization: xxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "id": "string"
}'
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "id": "string"
});

var config = {
  method: 'post',
  url: 'https://api.krypcore.com/api/v0/storagemanageripfs/updatePinStatus',
  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/storagemanageripfs/updatePinStatus"

payload = json.dumps({
  "id": "string"
})
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/storagemanageripfs/updatePinStatus"
  method := "POST"

  payload := strings.NewReader(`{
  "id": "string"
}`)

  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/storage-manager-apis/update-pin-status.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.
