---
title: Create a Telemetry Destination
url: https://platform.claude.com/docs/en/api/php/beta/organization/telemetry_destinations/create
---

# Create a Telemetry Destination

`$client->beta->organization->telemetryDestinations->create(string endpointURL, TelemetryDestinationWorkspacesParams workspaces, ?string displayName, ?array<string,string> headers, ?TelemetryDestinationTracesParams traces, ?list<AnthropicBeta> betas): TelemetryDestination`

**POST** `/v1/organizations/telemetry_destinations`

Register an OpenTelemetry destination for the organization.

The destination starts in state `enabled`. An organization can have at most 10 destinations, including disabled ones.

See the [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry?sdk_languages=php#add-a-destination) to learn more about adding a destination.

## Parameters

- `endpointURL: string`

  The base URL of your collector's OTLP/HTTP endpoint, for example `https://gateway.example.com`.

  The URL must use `https` and a hostname, not an IP address. The port, if given, must be 443. The URL must not contain a query string, a fragment, or a username and password. At most 2,048 characters.

  A path prefix, such as `/otlp`, is allowed. Don't include the per-signal path (`/v1/traces`), because the API appends it on delivery. If your collector takes traces on another path, also set `traces.endpoint_url`.

- `workspaces: TelemetryDestinationWorkspacesParams`

  Which of the organization's workspaces the destination covers.

- `displayName?: optional string`

  Human-readable name for the destination. Optional. 1 to 255 characters.

- `headers?: optional array<string,string>`

  Request headers that the API sends with every delivery, typically your collector's authentication header (for example `authorization`).

  The API never returns the values. Reads show only `header_names`.

  At most 20 headers. Names are at most 128 characters. Two names can't differ only in case. Values are printable ASCII, at most 4,096 characters, and can't begin or end with a space. Names and values together are at most 16,384 bytes.

  Reserved names are rejected, for example `host`, `cookie`, `user-agent`, and names that start with `content-`, `proxy-`, `x-forwarded-`, or `anthropic-`. For this check, `_` in a name counts as `-`.

- `traces?: optional TelemetryDestinationTracesParams`

  The settings for the traces that the destination receives. If you leave it out, every setting takes its default.

- `betas?: optional list<AnthropicBeta>` (header parameter)

  This endpoint is in beta: requests must send `telemetry-destinations-2026-08-11` in this header.

## Returns

- `class TelemetryDestination`

  - `"telemetry_destination" type`

  - `string id`

    The unique ID of the destination (`tdst_...`).

  - `\Datetime createdAt`

    Time the destination was created.

  - `TelemetryDestinationDeliveryHealth deliveryHealth`

    The most recent delivery results for this destination.

  - `?string displayName`

    Human-readable name for the destination. Null when none was set.

  - `string endpointURL`

    The base URL of the destination's OTLP/HTTP endpoint, exactly as registered.

    The API appends the per-signal path, such as `/v1/traces`, on delivery, unless `traces.endpoint_url` is set.

  - `list<string> headerNames`

    Names of the registered request headers. Header values are write-only and are never returned.

  - `TelemetryDestinationState state`

    Whether the destination receives deliveries.

  - `TelemetryDestinationTraces traces`

    The destination's settings for the traces it receives.

  - `\Datetime updatedAt`

    Time of the last change to the destination's configuration or state. Changes to `delivery_health` don't change it.

    An update that sets a header value always changes it, even when the value is the same as before. Adding or removing a single workspace on the destination's list doesn't change it. An update that changes the list does.

  - `TelemetryDestinationWorkspaces workspaces`

    Which of the organization's workspaces the destination covers.

## Example

```php
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Beta\Organization\TelemetryDestinations\TelemetryDestinationContentMode;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaTelemetryDestination = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->create(
  endpointURL: 'x',
  workspaces: ['type' => 'all'],
  displayName: 'display_name',
  headers: ['foo' => 'string'],
  traces: [
    'contentMode' => TelemetryDestinationContentMode::METADATA_ONLY,
    'enabled' => true,
    'endpointURL' => 'endpoint_url',
    'maxContentBytes' => 0,
  ],
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($betaTelemetryDestination);
```

### Response (200)

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "delivery_health": {
    "last_error": "last_error",
    "last_error_at": "2019-12-27T18:11:19.117Z",
    "last_success_at": "2019-12-27T18:11:19.117Z"
  },
  "display_name": "display_name",
  "endpoint_url": "endpoint_url",
  "header_names": [
    "string"
  ],
  "state": {
    "type": "enabled"
  },
  "traces": {
    "content_mode": "metadata_only",
    "enabled": true,
    "endpoint_url": "endpoint_url",
    "max_content_bytes": 0
  },
  "type": "telemetry_destination",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "workspaces": {
    "type": "all"
  }
}
```
