Observability

Update an observability destination

Changed on

Update an existing observability destination. Only the fields provided in the request body are updated. Enabling a disabled destination returns 400 while the workspace already has 5 enabled destinations. A workspace-scoped management key only reaches destinations in its own workspace; any other id returns 404. Management key required.

patch/observability/destinations/{id}

Request

  • Base URL
    https://openrouter.ai/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string uuid required

The destination ID (UUID).

Example:99999999-aaaa-bbbb-cccc-dddddddddddd

Request body

UpdateObservabilityDestinationRequest required
api_key_hashes, string[] nullable

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. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back.

broadcast_generation_cost, boolean

Whether to include cost and billing generation metadata.

broadcast_generation_cost_allocation, boolean

Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.

broadcast_generation_identity, boolean

Whether to include identity generation metadata.

broadcast_generation_request_context, boolean

Whether to include request-context generation metadata.

config, object

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

enabled, boolean

Whether the destination is enabled.

filter_rules, intersection

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

name, string

Human-readable name for the destination.

privacy_mode, boolean

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

regions, ObservabilityDataRegionInput[]

Data regions this destination applies to. eu is accepted as an alias for europe and normalizes to europe. Omitting this field keeps the current value; it cannot be cleared.

sampling_rate, number double

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

Example request

{
  "enabled": false,
  "name": "Updated Langfuse"
}

Response

Destination updated successfully

UpdateObservabilityDestinationResponse required
data, intersection required

The updated observability destination.

Example response

{
  "data": {
    "api_key_hashes": null,
    "broadcast_generation_cost": false,
    "broadcast_generation_cost_allocation": false,
    "broadcast_generation_identity": false,
    "broadcast_generation_request_context": false,
    "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,
    "regions": [
      "global"
    ],
    "sampling_rate": 1,
    "type": "langfuse",
    "updated_at": "2025-08-24T15:45:00Z",
    "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Changes

    • info

      added the optional property data/allOf[#/components/schemas/ObservabilityDestination]/oneOf[#/components/schemas/ObservabilityOtelCollectorDestination]/config/metricsEndpoint to the response with the status

    • info

      added the optional property data/allOf[#/components/schemas/ObservabilityDestination]/oneOf[#/components/schemas/ObservabilityOtelCollectorDestination]/config/shouldSendMetrics to the response with the status

    • info

      the data/allOf[#/components/schemas/ObservabilityDestination]/oneOf[#/components/schemas/ObservabilityS3Destination]/config/roleArn response's property pattern was changed from ^arn:aws(?:-[a-z]+)*:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$ to ^arn:aws:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$ for the status