Skip to main content

Update Token

Updates an existing token in the system.

Request

PUT /v2/admin/token/{token_id}

Parameters

NameTypeInDescription
token_idstringpathRequired. The ID of the token to update
namestringformRequired. The name of the token
descriptionstringformRequired. Description of the token
total_valuenumberformOptional. The total value of the token
currency_token_idstringformOptional. The currency token ID for the token value
salable_percentagenumberformOptional. Percentage of tokens that are salable (0-100)
imagesfileformOptional. New image file(s) for the token
documentsfileformOptional. New supporting document(s) for the token
remove_image_idsstringformOptional. Comma-separated list of image IDs to remove
remove_document_idsstringformOptional. Comma-separated list of document IDs to remove
oracle_idstringformOptional. Oracle ID for price reference
oracle_codestringformOptional. Oracle code for price reference

Headers

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

Example

curl --request PUT \
--url '\{\{baseUrl\}\}/v2/admin/token/67d8774e903bfcbe7eb5d93e' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: multipart/form-data' \
--form 'name=TKN Token Name Updated' \
--form 'description=Token Description' \
--form total_value=12000 \
--form currency_token_id=68fe8c129367fd414b227c7a \
--form salable_percentage=80 \
--form images=@/path/to/image.png \
--form documents=@/path/to/document.pdf \
--form remove_image_ids= \
--form remove_document_ids= \
--form oracle_id=677ed6e3cc111aea14a3dfc3 \
--form oracle_code=IOG

Response

A successful request returns an HTTP 200 status code with an empty response body.

Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing authentication token
404Not Found - Token ID does not exist
413Payload Too Large - File size exceeds limit
415Unsupported Media Type - File format not supported
500Internal Server Error