> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Token Metadata

> Update off-chain metadata for a stock token

Updates the off-chain record for a stock token owned by the authenticated instance. Only the instance that deployed or registered the token can update it. This does not modify on-chain state.

## Path Parameters

<ParamField path="tokenAddress" type="string" required>
  Address of the stock token contract.
</ParamField>

## Request Body

Accepts any combination of updatable fields. Only provided fields are changed.

<ParamField body="metadataURI" type="string">
  Updated metadata URI.
</ParamField>

<ParamField body="name" type="string">
  Updated display name.
</ParamField>

## Response Fields

<ResponseField name="success" type="boolean">Request status.</ResponseField>

<ResponseField name="data" type="object">
  The updated token record.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.trusset.org/stocks/api/manage/token/0x1234..." \
    -H "Content-Type: application/json" \
    -H "X-API-Key: trusset_abc123xy_secret..." \
    -d '{
      "metadataURI": "ipfs://QmUpdated..."
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    `https://api.trusset.org/stocks/api/manage/token/${tokenAddress}`,
    {
      method: 'PATCH',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': 'trusset_abc123xy_secret...'
      },
      body: JSON.stringify({ metadataURI: 'ipfs://QmUpdated...' })
    }
  );
  const { data } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "tokenAddress": "0x1234567890abcdef1234567890abcdef12345678",
      "name": "Acme Corp Equity",
      "metadataURI": "ipfs://QmUpdated..."
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z",
      "instanceId": "inst_abc123"
    }
  }
  ```

  ```json Error - Unauthorized theme={null}
  {
    "success": false,
    "error": {
      "code": "UNAUTHORIZED",
      "message": "Not your token"
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z",
      "instanceId": "inst_abc123"
    }
  }
  ```
</ResponseExample>
