Skip to content

Add a Trace Destination

POST/v1/traces/destinations

Overview

Requires an owner, admin or developer session; API keys are rejected. Only an owner or admin can turn on include_content. A workspace can have at most 10 destinations.

The endpoint must be a public https URL on port 443, 4318 or 8443, with no credentials in it. A webhook destination is given a signing secret, returned once in signing_secret. A Langfuse destination is named by its host only, such as https://cloud.langfuse.com, and authenticates with its public and secret keys. Headers, keys and the signing secret are stored encrypted. See the Trace Export guide (/docs/trace-export).

Authorization

Authorizationstring · headerRequired

Workspace session token sent as Bearer <token>. Authentication guide

Request Body

application/json
workspace_idstringRequired
namestringRequired
kindstringRequired

Values: "webhook""otlp""langfuse"

endpointstringRequired

A public https URL on port 443, 4318 or 8443. For Langfuse, the host only.

encodingstring

protobuf is for OTLP only.

Values: "json""protobuf"

Default: "json"

headersobject

Sent with every delivery, such as an API key header. Stored encrypted. Not for Langfuse; framing headers and audiolab-* names are refused.

public_keystring

Langfuse public key (pk-lf-…). Langfuse only, and required.

secret_keystring

Langfuse secret key (sk-lf-…). Langfuse only, and required.

sample_ratenumber

Default: 1

· Maximum 1

productsstring[]

Default: []

Show nested fields

A product, as request logs, exports and trace destinations filter by it.

include_contentboolean

Owners and admins only.

Default: false

enabledboolean

Default: true

Responses

201The destination. A webhook's signing secret is returned once.
application/json
idstringRequired

trd_ followed by 22 characters.

Example: "trd_example"

objectstringRequired

Values: "trace_destination"

workspace_idstringRequired

Example: "ws_example"

namestringRequired

Example: "Honeycomb"

kindstringRequired

webhook: signed JSON. otlp: OTLP/HTTP traces. langfuse: Langfuse's ingestion API.

Values: "webhook""otlp""langfuse"

Example: "otlp"

endpointstringRequired

The URL traces are sent to; for Langfuse, its host.

Example: "https://api.honeycomb.io/v1/traces"

encodingstringRequired

OTLP body encoding; json for other kinds.

Values: "json""protobuf"

Example: "protobuf"

header_namesstring[]Required

Names of the saved headers. Values are never returned.

Show nested fields

string

secret_hintstring | nullRequired

Last four characters of a webhook signing secret or Langfuse public key.

sample_ratenumberRequired

Share of requests sent. Sampling is per request, or per session_id when one is sent.

· Maximum 1

productsstring[]Required

Products traced; empty means all.

Show nested fields

A product, as request logs, exports and trace destinations filter by it.

include_contentbooleanRequired

Also send LLM prompts and outputs as text. Never applied under zero data retention.

enabledbooleanRequired
created_atstringRequired
updated_atstringRequired
last_deliveryobjectRequired
Show nested fields
statusstring | nullRequired

The most recent batch's outcome; null before the first.

Values: "delivered""retrying""dead"null

status_codeinteger | nullRequired

HTTP status the destination answered with.

Example: 200

errorstring | nullRequired

Example: null

attempted_atstring | nullRequired
delivered_atstring | nullRequired

The last successful delivery.

pendingintegerRequired

Traces waiting to be delivered or retried.

deadintegerRequired

Traces that could not be delivered, kept for 7 days.

signing_secretstring

A webhook's signing secret (whsec_…), returned only when created or rotated.

400Request validation failed.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

401Authentication is missing or invalid.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

403Authenticated principal lacks permission.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

409Request conflicts with current resource state.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

500Internal server error.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.