Skip to main content
PATCH
/
observability
/
destinations
/
{id}
Update an observability destination
curl --request PATCH \
  --url https://openrouter.ai/api/v1/observability/destinations/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": false,
  "name": "Updated Langfuse"
}
'
import requests

url = "https://openrouter.ai/api/v1/observability/destinations/{id}"

payload = {
"enabled": False,
"name": "Updated Langfuse"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: false, name: 'Updated Langfuse'})
};

fetch('https://openrouter.ai/api/v1/observability/destinations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://openrouter.ai/api/v1/observability/destinations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false,
'name' => 'Updated Langfuse'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://openrouter.ai/api/v1/observability/destinations/{id}"

payload := strings.NewReader("{\n \"enabled\": false,\n \"name\": \"Updated Langfuse\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://openrouter.ai/api/v1/observability/destinations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false,\n \"name\": \"Updated Langfuse\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://openrouter.ai/api/v1/observability/destinations/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false,\n \"name\": \"Updated Langfuse\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "api_key_hashes": null,
    "config": {
      "baseUrl": "https://us.cloud.langfuse.com",
      "publicKey": "pk-l...EfGh",
      "secretKey": "sk-l...AbCd"
    },
    "created_at": "2025-08-24T10:30:00Z",
    "enabled": true,
    "filter_rules": null,
    "id": "99999999-aaaa-bbbb-cccc-dddddddddddd",
    "name": "Production Langfuse",
    "privacy_mode": false,
    "sampling_rate": 1,
    "type": "langfuse",
    "updated_at": "2025-08-24T15:45:00Z",
    "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}
{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}
{
"error": {
"code": 404,
"message": "Resource not found"
}
}
{
"error": {
"code": 409,
"message": "Resource conflict. Please try again later."
}
}
{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

id
string<uuid>
required

The destination ID (UUID).

Example:

"99999999-aaaa-bbbb-cccc-dddddddddddd"

Body

application/json
api_key_hashes
string[] | null

Optional allowlist of OpenRouter API key hashes. null clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided.

Minimum array length: 1
Example:

null

config
object

Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value.

Example:
{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
}
enabled
boolean

Whether the destination is enabled.

Example:

true

filter_rules
object | null

Optional structured filter rules. null clears the rules. Omitting keeps the current value.

Example:

null

name
string

Human-readable name for the destination.

Example:

"Production Langfuse"

privacy_mode
boolean

When true, request/response bodies are not forwarded — only metadata.

Example:

false

sampling_rate
number<double>

Sampling rate between 0.0001 and 1 (1 = 100%).

Example:

1

Response

Destination updated successfully

data
object
required

The updated observability destination.

Example:
{
"api_key_hashes": null,
"config": {
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
},
"created_at": "2025-08-24T10:30:00Z",
"enabled": true,
"filter_rules": null,
"id": "99999999-aaaa-bbbb-cccc-dddddddddddd",
"name": "Production Langfuse",
"privacy_mode": false,
"sampling_rate": 1,
"type": "langfuse",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
}