Claude Platform Docs

Adicionar um workspace de destino de telemetria

$client->beta->organization->telemetryDestinations->workspaces->add(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaTelemetryDestinationWorkspace
POST/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Adiciona um workspace à lista de workspaces de um destino.

Com include, os spans do workspace passam a ser enviados ao destino. Com exclude, deixam de ser enviados. Uma lista comporta no máximo 1.000 workspaces.

Adicionar um workspace que já está na lista não altera nada e retorna a entrada existente. Um workspace arquivado que ainda não está na lista não pode ser adicionado. Um destino cujo workspaces.type é all não tem uma lista, portanto a API retorna 400. Para alterar quais workspaces esse destino cobre, atualize seu workspaces.

Consulte o guia de exportação do OpenTelemetry para saber mais sobre como escolher os workspaces de um destino.

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 { $type = 'telemetry_destination_workspace'; $createdAt; $telemetryDestinationID; $workspaceID; }
"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_...).

Adicionar um workspace de destino de telemetria
<?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);
Returns Examples
Response 200
{
  "created_at": "2019-12-27T18:11:19.117Z",
  "telemetry_destination_id": "telemetry_destination_id",
  "type": "telemetry_destination_workspace",
  "workspace_id": "workspace_id"
}