Update Currency Token by ID
Changes a currency token's descriptive fields. Only the fields you send with a non-empty value are changed; the rest keep their current values. The token's node must be the platform root node and inside your API key's node subtree. Nothing is sent on-chain.
The request is multipart/form-data.
Required permission: currency-token:update
Request
PUT /v2/admin/currency-tokens/{currency_token_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
currency_token_id | string | path | Required. Currency token ID (24-character hex) |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. multipart/form-data |
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New display name |
symbol | string | No | New symbol |
description | string | No | New description |
fiat_currency | string | No | ISO 4217 code the token is pegged to, for example USD, EUR, TRY |
logo | file | No | Accepted, but not stored by this endpoint at present |
Example
curl --request PUT \
--url '{{baseUrl}}/v2/admin/currency-tokens/6a859ae35a7db4268dfb40d2' \
--header 'Authorization: Bearer <access_token>' \
--form 'name="DigitalOceanCoin2"' \
--form 'description="DigitalOceanCoin2 Desc"' \
--form 'fiat_currency="USD"'
Response
200 OK with an empty body. Read the token with Get Currency Token by ID to see the result.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed — see details. Includes an unknown fiat_currency |
| 404 | 10001 (domain 15) | Currency token not found |
| 400 | 10001 (domain 2) | The token's node was not found |
| 403 | 10005 (domain 2) | The token's node is not the platform root node, or is outside your API key's node subtree |
| 500 | 10000 | Unexpected server error, including a currency_token_id that is not a 24-character hex ID |
See Errors for the error format and common codes.