---
title: Telemetry Destinations
url: https://platform.claude.com/docs/en/api/php/beta/organization/telemetry_destinations
---

# Telemetry Destinations

## 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"
  }
}
```

## List Telemetry Destinations

`$client->beta->organization->telemetryDestinations->list(?int limit, ?string page, ?list<string> workspaceIDs, ?list<AnthropicBeta> betas): PageCursor<TelemetryDestination>`

**GET** `/v1/organizations/telemetry_destinations`

List the organization's destinations, newest first, optionally only those that cover given workspaces.

See the [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry?sdk_languages=php#set-up-api-tracing) to learn more about destinations.

### Parameters

- `limit?: optional int` (query parameter)

  Number of destinations to return per page, between 1 and 1,000. Defaults to 20.

- `page?: optional string` (query parameter)

  Opaque cursor from a previous response's `next_page`. Leave it out to get the first page.

- `workspaceIDs?: optional list<string>` (query parameter)

  Return only the destinations that cover at least one of these workspaces (`wrkspc_...`).

  Send at most 100 IDs, as `workspace_ids[]`. A destination covers a workspace when its `workspaces.type` is `all`, when its `include` list has the workspace, or when its `exclude` list doesn't have it. Destinations in either state can match. An ID that isn't the ID of one of the organization's workspaces doesn't match any destination, not even one whose type is `all`.

- `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;

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

$page = $client->beta->organization->telemetryDestinations->list(
  limit: 0,
  page: 'page',
  workspaceIDs: ['string'],
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($page);
```

#### Response (200)

```json
{
  "data": [
    {
      "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"
      }
    }
  ],
  "next_page": "next_page"
}
```

## Retrieve a Telemetry Destination

`$client->beta->organization->telemetryDestinations->retrieve(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestination`

**GET** `/v1/organizations/telemetry_destinations/{destination_id}`

Read a destination's configuration, state, and most recent delivery results.

See the [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry?sdk_languages=php#delivery-and-health) to learn how the API delivers spans and when it disables a destination.

### Parameters

- `destinationID: string` (path parameter)

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

- `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;

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

$betaTelemetryDestination = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->retrieve(
  'destination_id', 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"
  }
}
```

## Update a Telemetry Destination

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

**POST** `/v1/organizations/telemetry_destinations/{destination_id}`

Change a telemetry destination's settings, its state, or which workspaces it covers.

Send at least one field. Omitted fields keep their stored values, except the registered headers, which a change of the endpoint's hostname or port removes. Only `display_name`, `traces`, `traces.endpoint_url`, `traces.content_mode`, `traces.max_content_bytes`, and individual `headers` values accept `null`.

If another request changes the destination while the update runs, the API returns a 409 `conflict_error`. Read the destination again, then retry the update.

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

### Parameters

- `destinationID: string` (path parameter)

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

- `displayName?: optional string`

  New human-readable name, 1 to 255 characters. Null clears it.

- `endpointURL?: optional string`

  The new base URL of the destination's OTLP/HTTP endpoint. The same rules as on create apply.

  A change of hostname or port first removes every registered header, so send the headers for the new endpoint in the same request. When the destination has a `traces.endpoint_url`, such a change must also set `traces.endpoint_url` to a URL with the new hostname and port, or to `null`. A change of the path alone keeps the headers.

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

  Headers to set or remove. The API merges them into the destination's headers by name.

  Names compare case-insensitively. A string value sets or replaces that header. A `null` value removes it. Headers that you omit don't change. The field itself can't be `null`.

  A request that sets a header value must also include `endpoint_url`. The current URL is accepted.

  The resulting set must stay within the same limits as on create. When the request sets a value, each stored value that it doesn't set counts as 4,096 bytes toward the 16,384-byte limit, because you can't read its real length. So to change one header of a destination that has four or more other headers, send the values of the others again in the same request.

- `state?: optional TelemetryDestinationStateParams`

  Whether the destination receives deliveries after the update. The field can't be `null`.

- `traces?: optional TelemetryDestinationTracesParams`

  The traces settings to change. Omitted settings keep their stored values.

  `null` sets every traces setting to its create default.

- `workspaces?: optional TelemetryDestinationWorkspacesParams`

  The new workspace scope, in the same form as on create. The field can't be `null`.

  The API refuses an update that changes the type or sends `workspace_ids` while the destination's list has more than 750 workspaces. Remove workspaces one at a time until 750 or fewer remain, then send the update again.

- `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
  ->update(
  'destination_id',
  displayName: 'display_name',
  endpointURL: 'endpoint_url',
  headers: ['foo' => 'string'],
  state: ['type' => 'enabled'],
  traces: [
    'contentMode' => TelemetryDestinationContentMode::METADATA_ONLY,
    'enabled' => true,
    'endpointURL' => 'endpoint_url',
    'maxContentBytes' => 0,
  ],
  workspaces: ['type' => 'all'],
  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"
  }
}
```

## Delete a Telemetry Destination

`$client->beta->organization->telemetryDestinations->delete(string destinationID, ?list<AnthropicBeta> betas): DeletedTelemetryDestination`

**DELETE** `/v1/organizations/telemetry_destinations/{destination_id}`

Delete a destination and its workspace list.

The API stops sending spans to the destination. The spans of the workspaces it covered still go to the other destinations that cover them. A deleted destination can't be read, listed, or restored.

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

### Parameters

- `destinationID: string` (path parameter)

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

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

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

### Returns

- `class DeletedTelemetryDestination`

  - `"telemetry_destination_deleted" type`

  - `string id`

    ID of the deleted destination (`tdst_...`).

### Example

```php
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$betaDeletedTelemetryDestination = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->delete(
  'destination_id', betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24]
);

var_dump($betaDeletedTelemetryDestination);
```

#### Response (200)

```json
{
  "id": "id",
  "type": "telemetry_destination_deleted"
}
```

## Test a Telemetry Destination

`$client->beta->organization->telemetryDestinations->test(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestinationTestResponse`

**POST** `/v1/organizations/telemetry_destinations/{destination_id}/test`

Send one test span, named `anthropic.test`, to the destination with its registered headers, once and without retries, and report the destination's answer. The response is 200 whether or not the destination answered with a 2xx status: its `result` has the type `success`, or the type `failure` and the reason in `error`. The destination's configuration, `state` and `delivery_health` do not change. A disabled destination can be tested too. Wait 10 seconds between tests of one destination; a request that comes sooner may be answered with status 429.

### Parameters

- `destinationID: string` (path parameter)

  ID of the destination to test (starts with `tdst_`).

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

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

### Returns

- `class TelemetryDestinationTestResponse`

  - `"telemetry_destination_test" type`

  - `TelemetryDestinationTestResult result`

    How the test went: `success` when the destination answered with a 2xx status, else `failure` with the reason.

### Example

```php
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$betaTelemetryDestinationTestResponse = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->test('destination_id', betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24]);

var_dump($betaTelemetryDestinationTestResponse);
```

#### Response (200)

```json
{
  "result": {
    "type": "success"
  },
  "type": "telemetry_destination_test"
}
```

## Domain types

### Beta Deleted Telemetry Destination

- `class DeletedTelemetryDestination`

  - `"telemetry_destination_deleted" type`

  - `string id`

    ID of the deleted destination (`tdst_...`).

### Beta Telemetry Destination

- `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.

### Beta Telemetry Destination Content Mode

- `enum TelemetryDestinationContentMode`

  - `"metadata_only"`

    The spans contain identifiers, timing, status, token counts, and similar metadata. They don't contain prompt text, completion text, or tool inputs and outputs.

  - `"content"`

    The spans contain the same metadata as `metadata_only`, plus message and tool content.

    An organization with a data-handling restriction, such as under HIPAA, can't choose this mode. The API exports only metadata for such an organization, even to a destination that already has `content`.

### Beta Telemetry Destination Delivery Health

- `class TelemetryDestinationDeliveryHealth`

  - `?string lastError`

    A message that describes the most recent failed delivery to the destination, or `null` if no delivery has failed yet.

    Examples are `temporary DNS failure`, `TLS failure`, `timeout`, `connection failure`, `invalid address`, `HTTP error (status 503)`, and `redirect (status 301)`. The message is `invalid address` both for a hostname that doesn't exist and for an address that isn't publicly routable. It never contains the endpoint's response body, a header value, a network address, or TLS details.

    `last_error` and `last_error_at` always change together. A later successful delivery doesn't clear them. If `last_success_at` is later than `last_error_at`, a delivery has succeeded since this failure.

    See the [OpenTelemetry export guide](https://platform.claude.com/docs/en/manage-claude/opentelemetry?sdk_languages=php#delivery-errors) to learn the likely cause of each error.

  - `?\Datetime lastErrorAt`

    Time of the failure that `last_error` describes. Changes together with `last_error`. Null until a delivery first fails.

  - `?\Datetime lastSuccessAt`

    Time of the most recent successful delivery to the destination, or `null` if no delivery has succeeded yet.

### Beta Telemetry Destination Disabled Reason

- `class TelemetryDestinationDisabledReason`

  - `class TelemetryDestinationDisabledReasonCaller`

    - `"caller" type`

  - `class TelemetryDestinationDisabledReasonSustainedFailure`

    - `"sustained_failure" type`

  - `class TelemetryDestinationDisabledReasonInvalidAddress`

    - `"invalid_address" type`

  - `class TelemetryDestinationDisabledReasonRedirect`

    - `"redirect" type`

### Beta Telemetry Destination Disabled Reason Caller

- `class TelemetryDestinationDisabledReasonCaller`

  - `"caller" type`

### Beta Telemetry Destination Disabled Reason Invalid Address

- `class TelemetryDestinationDisabledReasonInvalidAddress`

  - `"invalid_address" type`

### Beta Telemetry Destination Disabled Reason Redirect

- `class TelemetryDestinationDisabledReasonRedirect`

  - `"redirect" type`

### Beta Telemetry Destination Disabled Reason Sustained Failure

- `class TelemetryDestinationDisabledReasonSustainedFailure`

  - `"sustained_failure" type`

### Beta Telemetry Destination State

- `class TelemetryDestinationState`

  - `class TelemetryDestinationStateEnabled`

    - `"enabled" type`

  - `class TelemetryDestinationStateDisabled`

    - `"disabled" type`

    - `TelemetryDestinationDisabledReason reason`

      Whether a caller or the API disabled the destination and, when the API did, why. Read-only.

### Beta Telemetry Destination State Disabled

- `class TelemetryDestinationStateDisabled`

  - `"disabled" type`

  - `TelemetryDestinationDisabledReason reason`

    Whether a caller or the API disabled the destination and, when the API did, why. Read-only.

### Beta Telemetry Destination State Disabled Params

- `class TelemetryDestinationStateDisabledParams`

  - `"disabled" type`

### Beta Telemetry Destination State Enabled

- `class TelemetryDestinationStateEnabled`

  - `"enabled" type`

### Beta Telemetry Destination State Enabled Params

- `class TelemetryDestinationStateEnabledParams`

  - `"enabled" type`

### Beta Telemetry Destination State Params

- `class TelemetryDestinationStateParams`

  - `class TelemetryDestinationStateEnabledParams`

    - `"enabled" type`

  - `class TelemetryDestinationStateDisabledParams`

    - `"disabled" type`

### Beta Telemetry Destination Test Failure

- `class TelemetryDestinationTestFailure`

  - `"failure" type`

  - `string error`

    A message that describes why the test span was not delivered, including the HTTP status code when the destination returned one. Examples: `HTTP error (status 403)`, `timeout`, `TLS failure`. It has the same form as the destination's `delivery_health.last_error` and never contains the destination's response body, any header value, a network address, or TLS details.

### Beta Telemetry Destination Test Response

- `class TelemetryDestinationTestResponse`

  - `"telemetry_destination_test" type`

  - `TelemetryDestinationTestResult result`

    How the test went: `success` when the destination answered with a 2xx status, else `failure` with the reason.

### Beta Telemetry Destination Test Result

- `class TelemetryDestinationTestResult`

  - `class TelemetryDestinationTestSuccess`

    - `"success" type`

  - `class TelemetryDestinationTestFailure`

    - `"failure" type`

    - `string error`

      A message that describes why the test span was not delivered, including the HTTP status code when the destination returned one. Examples: `HTTP error (status 403)`, `timeout`, `TLS failure`. It has the same form as the destination's `delivery_health.last_error` and never contains the destination's response body, any header value, a network address, or TLS details.

### Beta Telemetry Destination Test Success

- `class TelemetryDestinationTestSuccess`

  - `"success" type`

### Beta Telemetry Destination Traces

- `class TelemetryDestinationTraces`

  - `TelemetryDestinationContentMode contentMode`

    What the exported spans contain.

  - `bool enabled`

    Whether the destination receives traces. A destination whose `enabled` is false keeps its other settings.

  - `?string endpointURL`

    The full URL that the API posts traces to, exactly as registered, or `null` if the destination doesn't have one.

    When it is `null`, the API posts traces to `endpoint_url` with `/v1/traces` appended.

  - `?int maxContentBytes`

    The most bytes of content that one exported span can contain, or `null` if only the API's maximum applies.

    Content means model prompts and responses, and tool inputs and outputs. The API shortens longer content to this size before it delivers the span. A destination whose `content_mode` is `metadata_only` keeps this value. It applies once `content_mode` is `content`.

### Beta Telemetry Destination Traces Params

- `class TelemetryDestinationTracesParams`

  - `?TelemetryDestinationContentMode contentMode`

    What the exported spans contain. Defaults to `metadata_only` on create.

    On update, `null` sets `metadata_only`.

  - `?bool enabled`

    Whether the destination receives traces. Defaults to true on create. It cannot be null.

  - `?string endpointURL`

    The full URL of your collector's traces endpoint, for a collector that takes traces on a path other than `/v1/traces`. The API posts traces to it exactly as given and appends nothing.

    The same rules as for `endpoint_url` apply, except that any path is allowed. It must have the same scheme, host, and port as `endpoint_url`. At most 2,048 characters.

    On create, `null` is the same as leaving it out. On update, `null` removes it. The API then posts traces to `endpoint_url` with `/v1/traces` appended. A change of this URL alone keeps the registered headers.

  - `?int maxContentBytes`

    The most bytes of content that one exported span can contain, from 1 up to the API's maximum. `null` sets no bound, so only the API's maximum applies.

    On create, leaving it out is the same as `null`. The error for a value above the maximum states the maximum.

### Beta Telemetry Destination Workspaces

- `class TelemetryDestinationWorkspaces`

  - `class TelemetryDestinationWorkspacesAll`

    - `"all" type`

  - `class TelemetryDestinationWorkspacesInclude`

    - `"include" type`

  - `class TelemetryDestinationWorkspacesExclude`

    - `"exclude" type`

### Beta Telemetry Destination Workspaces All

- `class TelemetryDestinationWorkspacesAll`

  - `"all" type`

### Beta Telemetry Destination Workspaces All Params

- `class TelemetryDestinationWorkspacesAllParams`

  - `"all" type`

### Beta Telemetry Destination Workspaces Exclude

- `class TelemetryDestinationWorkspacesExclude`

  - `"exclude" type`

### Beta Telemetry Destination Workspaces Exclude Params

- `class TelemetryDestinationWorkspacesExcludeParams`

  - `"exclude" type`

  - `?list<string> workspaceIDs`

    The IDs of the workspaces on the destination's list (`wrkspc_...`). At most 100 per request.

    On create, these workspaces become the destination's list. If you leave `workspace_ids` out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

    On update, `workspace_ids` replaces the whole list. A workspace that stays on the list keeps its entry and its `created_at`. An empty array empties the list. If you leave `workspace_ids` out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to `include` without `workspace_ids`, the destination doesn't cover any workspace until one is added. After a change to `exclude` without `workspace_ids`, it covers every workspace.

    An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

### Beta Telemetry Destination Workspaces Include

- `class TelemetryDestinationWorkspacesInclude`

  - `"include" type`

### Beta Telemetry Destination Workspaces Include Params

- `class TelemetryDestinationWorkspacesIncludeParams`

  - `"include" type`

  - `?list<string> workspaceIDs`

    The IDs of the workspaces on the destination's list (`wrkspc_...`). At most 100 per request.

    On create, these workspaces become the destination's list. If you leave `workspace_ids` out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

    On update, `workspace_ids` replaces the whole list. A workspace that stays on the list keeps its entry and its `created_at`. An empty array empties the list. If you leave `workspace_ids` out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to `include` without `workspace_ids`, the destination doesn't cover any workspace until one is added. After a change to `exclude` without `workspace_ids`, it covers every workspace.

    An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

### Beta Telemetry Destination Workspaces Params

- `class TelemetryDestinationWorkspacesParams`

  - `class TelemetryDestinationWorkspacesAllParams`

    - `"all" type`

  - `class TelemetryDestinationWorkspacesIncludeParams`

    - `"include" type`

    - `?list<string> workspaceIDs`

      The IDs of the workspaces on the destination's list (`wrkspc_...`). At most 100 per request.

      On create, these workspaces become the destination's list. If you leave `workspace_ids` out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

      On update, `workspace_ids` replaces the whole list. A workspace that stays on the list keeps its entry and its `created_at`. An empty array empties the list. If you leave `workspace_ids` out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to `include` without `workspace_ids`, the destination doesn't cover any workspace until one is added. After a change to `exclude` without `workspace_ids`, it covers every workspace.

      An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

  - `class TelemetryDestinationWorkspacesExcludeParams`

    - `"exclude" type`

    - `?list<string> workspaceIDs`

      The IDs of the workspaces on the destination's list (`wrkspc_...`). At most 100 per request.

      On create, these workspaces become the destination's list. If you leave `workspace_ids` out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

      On update, `workspace_ids` replaces the whole list. A workspace that stays on the list keeps its entry and its `created_at`. An empty array empties the list. If you leave `workspace_ids` out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to `include` without `workspace_ids`, the destination doesn't cover any workspace until one is added. After a change to `exclude` without `workspace_ids`, it covers every workspace.

      An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

## Telemetry Destinations › Workspaces

### List Telemetry Destination Workspaces

`$client->beta->organization->telemetryDestinations->workspaces->list(string destinationID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<BetaTelemetryDestinationWorkspace>`

**GET** `/v1/organizations/telemetry_destinations/{destination_id}/workspaces`

List the workspaces on a destination's workspace list, newest entry first.

A destination whose `workspaces.type` is `all` doesn't have a list, so its page is empty. The list includes archived workspaces.

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

#### Parameters

- `destinationID: string` (path parameter)

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

- `limit?: optional int` (query parameter)

  Number of entries to return per page, between 1 and 1,000. Defaults to 20.

- `page?: optional string` (query parameter)

  Opaque cursor from a previous response's `next_page`. Leave it out to get the first page.

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

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

#### Returns

- `class BetaTelemetryDestinationWorkspace`

  - `"telemetry_destination_workspace" type`

  - `\Datetime createdAt`

    Time the workspace was added to the list.

  - `string telemetryDestinationID`

    ID of the telemetry destination (`tdst_...`).

  - `string workspaceID`

    ID of the workspace (`wrkspc_...`).

#### Example

```php
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$page = $client->beta->organization->telemetryDestinations->workspaces->list(
  'destination_id',
  limit: 0,
  page: 'page',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($page);
```

##### Response (200)

```json
{
  "data": [
    {
      "created_at": "2019-12-27T18:11:19.117Z",
      "telemetry_destination_id": "telemetry_destination_id",
      "type": "telemetry_destination_workspace",
      "workspace_id": "workspace_id"
    }
  ],
  "next_page": "next_page"
}
```

### Add a Telemetry Destination Workspace

`$client->beta->organization->telemetryDestinations->workspaces->add(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaTelemetryDestinationWorkspace`

**POST** `/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}`

Add one workspace to a destination's workspace list.

Under `include` the workspace's spans start going to the destination. Under `exclude` they stop. A list holds at most 1,000 workspaces.

Adding a workspace that is already on the list changes nothing and returns the existing entry. An archived workspace that isn't on the list yet can't be added. A destination whose `workspaces.type` is `all` doesn't have a list, so the API returns 400. To change which workspaces such a destination covers, update its `workspaces`.

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

#### Parameters

- `destinationID: string` (path parameter)

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

- `workspaceID: string` (path parameter)

  ID of the workspace to add (`wrkspc_...`).

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

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

#### Returns

- `class BetaTelemetryDestinationWorkspace`

  - `"telemetry_destination_workspace" type`

  - `\Datetime createdAt`

    Time the workspace was added to the list.

  - `string telemetryDestinationID`

    ID of the telemetry destination (`tdst_...`).

  - `string workspaceID`

    ID of the workspace (`wrkspc_...`).

#### Example

```php
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$betaTelemetryDestinationWorkspace = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->workspaces
  ->add(
  'workspace_id',
  destinationID: 'destination_id',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($betaTelemetryDestinationWorkspace);
```

##### Response (200)

```json
{
  "created_at": "2019-12-27T18:11:19.117Z",
  "telemetry_destination_id": "telemetry_destination_id",
  "type": "telemetry_destination_workspace",
  "workspace_id": "workspace_id"
}
```

### Remove a Telemetry Destination Workspace

`$client->beta->organization->telemetryDestinations->workspaces->remove(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaDeletedTelemetryDestinationWorkspace`

**DELETE** `/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}`

Remove one workspace from a destination's workspace list.

Under `include` the workspace's spans stop going to the destination. Under `exclude` they start. An archived workspace can be removed too.

The API returns 404 when the workspace isn't on the list. A destination whose `workspaces.type` is `all` doesn't have a list, so the API returns 400.

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

#### Parameters

- `destinationID: string` (path parameter)

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

- `workspaceID: string` (path parameter)

  ID of the workspace to remove (`wrkspc_...`).

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

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

#### Returns

- `class BetaDeletedTelemetryDestinationWorkspace`

  - `"telemetry_destination_workspace_deleted" type`

  - `string telemetryDestinationID`

    ID of the telemetry destination (`tdst_...`).

  - `string workspaceID`

    ID of the workspace that was removed (`wrkspc_...`).

#### Example

```php
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$betaDeletedTelemetryDestinationWorkspace = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->workspaces
  ->remove(
  'workspace_id',
  destinationID: 'destination_id',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($betaDeletedTelemetryDestinationWorkspace);
```

##### Response (200)

```json
{
  "telemetry_destination_id": "telemetry_destination_id",
  "type": "telemetry_destination_workspace_deleted",
  "workspace_id": "workspace_id"
}
```
