# Update LLM integration

Rename an existing LLM provider integration.





Renames an existing LLM integration. The underlying provider credential is not changed by this endpoint — only the human-readable label.

```http
PATCH /api/public/v1/integrations/llm/{id}
```

## Request body [#request-body]

<TypeTable
  type="{
  name: {
    type: &#x22;string&#x22;,
    required: true,
    description: &#x22;New display name for the integration.&#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 PATCH https://api.nairi.ai/api/public/v1/integrations/llm/INTEGRATION_ID \
      -H "Authorization: Bearer $NAIRI_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "name": "Staging Anthropic" }'
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const res = await fetch(
      `https://api.nairi.ai/api/public/v1/integrations/llm/${integrationId}`,
      {
        method: "PATCH",
        headers: {
          Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ name: "Staging Anthropic" }),
      },
    );
    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/integrations/llm/#{integration_id}")
    req = Net::HTTP::Patch.new(uri)
    req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"
    req["Content-Type"] = "application/json"
    req.body = { name: "Staging Anthropic" }.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.patch(
        f"https://api.nairi.ai/api/public/v1/integrations/llm/{integration_id}",
        headers={
            "Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}",
            "Content-Type": "application/json",
        },
        json={"name": "Staging Anthropic"},
    )
    data = res.json()
    ```
  </Tab>

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

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

    func main() {
    	id := os.Getenv("INTEGRATION_ID")
    	body, _ := json.Marshal(map[string]any{"name": "Staging Anthropic"})
    	req, _ := http.NewRequest("PATCH", "https://api.nairi.ai/api/public/v1/integrations/llm/"+id, 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: `200 OK` [#response-200-ok]

```json
{
  "id": "ai_01KFRX8K1CKQGCV2W5J9C9Z37H",
  "type": "anthropic",
  "name": "Staging Anthropic",
  "created_at": "2026-02-20T14:00:00.000Z",
  "updated_at": "2026-05-14T16:00:00.000Z"
}
```

## Error responses [#error-responses]

| HTTP  | Body                                              | When                                                        |
| ----- | ------------------------------------------------- | ----------------------------------------------------------- |
| `400` | `{"error":"integration ID must be a valid ULID"}` | Path `id` is not a valid ULID.                              |
| `400` | `{"error":"name is required"}`                    | Body is missing `name`.                                     |
| `404` | `{"error":"LLM integration not found"}`           | The integration does not exist in the calling organization. |
