Tokens

Update a developer token's metadata

Update label, origin allowlist, and/or endpointConfigId binding. All three fields use absent-vs-null semantics: omit a key to leave it untouched; set to null to clear it. The endpointConfigId binding determines which EndpointConfig the Anthropic proxy routes to when this token authenticates a request — see docs/features/anthropic-api-proxy.md § "Provider Selection".

Validates endpointConfigId against EndpointConfigStore; an unknown id surfaces as 404.

patch/v1/tokens/{tokenId}

Request

  • Base URL: http://localhost:9998
  • URL: http://localhost:9998/v1/tokens/{tokenId}
  • Auth: HTTP bearer

Request body

labelstring
originsstring[] nullable
endpointConfigIdstring nullable

Response

Updated token (masked prefix; raw token never returned)

idstring required
labelstring required
tokenPrefixstring required

Masked prefix for display (e.g. tp_a1b2c3d4...). The raw token is returned exactly once at creation time and never echoed back; subsequent reads expose only this prefix.

originsstring[] nullable
endpointConfigIdstring nullable

Per-token Anthropic-proxy binding. When set, requests authenticated with this token route to this EndpointConfig regardless of the global setting. Takes precedence over the global setting; overridden only by model: "toolpiper:tp-<id>" prefix on the request body.

createdAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.