Skip to main content

Update Currency Token by ID

Updates an existing currency token with the specified ID.

Request

PUT /v2/admin/currency-tokens/{currencyTokenID}

Parameters

NameTypeInDescription
currencyTokenIDstringpathRequired. The ID of the currency token to update

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be multipart/form-data

Body (multipart/form-data)

FieldTypeRequiredDescription
namestringNoCurrency token display name
descriptionstringNoDescription of the currency token
fiat_currencystringNoISO 4217 fiat currency code (e.g., USD, EUR, TRY). Must be a valid ISO 4217 currency code

Example

curl --location --request PUT '{{baseUrl}}/v2/admin/currency-tokens/68fb4de0d622a0564999aeb7' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--form 'name="DigitalOceanCoin2"' \
--form 'description="DigitalOceanCoin2 Desc"' \
--form 'fiat_currency="USD"'

Response

A successful request returns an HTTP 200 status code with no content.

Status Codes

Status CodeDescription
200Success - Currency token updated successfully
400Bad Request - Invalid input or fiat currency code
401Unauthorized - Invalid or missing authentication token
404Not Found - Currency token does not exist
415Unsupported Media Type - Invalid file upload
500Internal Server Error