# Update

Replace an MCP config's metadata and content.





```http
PUT /api/public/v1/artifacts/mcp-configs/{config_id}
```

## Request body [#request-body]

<TypeTable
  type="{
  title: {
    type: &#x22;string&#x22;,
    required: true,
    description: &#x22;Config title.&#x22;
  },
  description: {
    type: &#x22;string&#x22;,
    required: true,
    description: &#x22;Brief description.&#x22;
  },
  content: {
    type: &#x22;string&#x22;,
    description: &#x22;MCP configuration JSON. Omit to keep the existing content (metadata-only update).&#x22;
  },
  is_sensitive: {
    type: &#x22;boolean&#x22;,
    description: &#x22;Whether the config contains sensitive data.&#x22;
  }
}"
/>

## Example [#example]

<Tabs items="[&#x22;bash&#x22;, &#x22;TypeScript&#x22;, &#x22;Ruby&#x22;, &#x22;Python&#x22;, &#x22;Go&#x22;]">
  <Tab value="bash">
    ```bash
    curl -X PUT https://api.nairi.ai/api/public/v1/artifacts/mcp-configs/CONFIG_ID \
      -H "Authorization: Bearer $NAIRI_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Updated Database MCP",
        "description": "Updated description",
        "content": "{\"mcpServers\": {...}}",
        "is_sensitive": true
      }'
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const res = await fetch(
      `https://api.nairi.ai/api/public/v1/artifacts/mcp-configs/${configId}`,
      {
        method: "PUT",
        headers: {
          Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          title: "Updated Database MCP",
          description: "Updated description",
          content: '{"mcpServers": {...}}',
          is_sensitive: true,
        }),
      },
    );
    const data = await res.json();
    ```
  </Tab>

  <Tab value="Ruby">
    ```ruby
    require "net/http"
    require "json"
    require "uri"

    uri = URI("https://api.nairi.ai/api/public/v1/artifacts/mcp-configs/#{config_id}")
    req = Net::HTTP::Put.new(uri)
    req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"
    req["Content-Type"] = "application/json"
    req.body = {
      title: "Updated Database MCP",
      description: "Updated description",
      content: '{"mcpServers": {...}}',
      is_sensitive: true,
    }.to_json

    res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
    data = JSON.parse(res.body)
    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    res = requests.put(
        f"https://api.nairi.ai/api/public/v1/artifacts/mcp-configs/{config_id}",
        headers={
            "Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}",
            "Content-Type": "application/json",
        },
        json={
            "title": "Updated Database MCP",
            "description": "Updated description",
            "content": '{"mcpServers": {...}}',
            "is_sensitive": True,
        },
    )
    data = res.json()
    ```
  </Tab>

  <Tab value="Go">
    ```go
    package main

    import (
    	"bytes"
    	"encoding/json"
    	"fmt"
    	"io"
    	"net/http"
    	"os"
    )

    func main() {
    	configID := os.Getenv("CONFIG_ID")
    	body, _ := json.Marshal(map[string]any{
    		"title":        "Updated Database MCP",
    		"description":  "Updated description",
    		"content":      `{"mcpServers": {...}}`,
    		"is_sensitive": true,
    	})
    	req, _ := http.NewRequest(
    		"PUT",
    		"https://api.nairi.ai/api/public/v1/artifacts/mcp-configs/"+configID,
    		bytes.NewReader(body),
    	)
    	req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
    	req.Header.Set("Content-Type", "application/json")
    	res, _ := http.DefaultClient.Do(req)
    	defer res.Body.Close()
    	raw, _ := io.ReadAll(res.Body)
    	var data map[string]any
    	json.Unmarshal(raw, &data)
    	fmt.Println(data)
    }
    ```
  </Tab>
</Tabs>

## Response [#response]

```json
{
  "id": "amc_01KRB3E9725XECM1824B8B2XF2",
  "title": "Updated Database MCP",
  "description": "Updated description",
  "is_sensitive": true,
  "created_at": "2026-04-12T18:45:12.000Z",
  "updated_at": "2026-04-12T18:50:00.000Z"
}
```
