Skip to main content

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​

NameTypeInDescription
currency_token_idstringpathRequired. Currency token ID (24-character hex)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. multipart/form-data

Body​

FieldTypeRequiredDescription
namestringNoNew display name
symbolstringNoNew symbol
descriptionstringNoNew description
fiat_currencystringNoISO 4217 code the token is pegged to, for example USD, EUR, TRY
logofileNoAccepted, 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​

StatusCodeDescription
40010015Validation failed — see details. Includes an unknown fiat_currency
40410001 (domain 15)Currency token not found
40010001 (domain 2)The token's node was not found
40310005 (domain 2)The token's node is not the platform root node, or is outside your API key's node subtree
50010000Unexpected server error, including a currency_token_id that is not a 24-character hex ID

See Errors for the error format and common codes.