Update Token
Updates an existing token in the system.
Request
PUT /v2/admin/token/{token_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
token_id | string | path | Required. The ID of the token to update |
name | string | form | Optional. The name of the token |
description | string | form | Optional. Description of the token |
value | number | form | Optional. The token value |
value_symbol | string | form | Optional. Symbol for the value (e.g., USDT) |
rate | number | form | Optional. Token rate |
images | file | form | Optional. New image file(s) for the token |
documents | file | form | Optional. New supporting document(s) for the token |
remove_image_ids | string | form | Optional. Comma-separated list of image IDs to remove |
remove_document_ids | string | form | Optional. Comma-separated list of document IDs to remove |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. 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 value=12000 \
--form value_symbol=USDT \
--form rate=30 \
--form images=@/path/to/image.png \
--form documents=@/path/to/document.pdf \
--form remove_image_ids= \
--form remove_document_ids=
Response
A successful request returns an HTTP 200 status code with an empty response body.
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - Token ID does not exist |
| 413 | Payload Too Large - File size exceeds limit |
| 415 | Unsupported Media Type - File format not supported |
| 500 | Internal Server Error |