Updated on December 19, 2023

Add or Update Token

Adding or updating a token involves using this method, enabling users to manage token details. The following fields can be included:

  • Token Name
  • Number of Bytes
  • Minimum Number of Bytes
  • Maximum Number of Bytes
  • Token Characters (e.g., Numeric, Alphanumeric, Text)
  • Case Sensitivity (Yes or No)

Endpoint and Authentication:

Endpoint: https://trial.protecto.ai/api/vault/metadata/update-token

For authentication, include the following token in the request headers:

Headers: {“Authorization”: “Bearer <AUTH_TOKEN>”}

Request Payload:

Here’s an example of a request payload Add or Update Token

{
"data": [
{
"tokenName": "Test Token 02",
"noOfBytes": "same as input",
"minimumNoOfBytes": "5",
"maximumNoOfBytes": "150",
"tokenCharacters": "numeric",
"caseSensitive": false,
"type": "custom"
},
{
"tokenName": "Test Token 01",
"noOfBytes": "random",
"minimumNoOfBytes": "6",
"maximumNoOfBytes": "100",
"tokenCharacters": "alpha-numeric",
"caseSensitive": true,
"type": "custom"
}
]
}

Response:

Here’s an example of a response:

Response

{
"data": [
{
"tokenName": "Test Token 02",
"noOfBytes": "same as input",
"minimumNoOfBytes": "5",
"maximumNoOfBytes": "150",
"tokenCharacters": "numeric",
"caseSensitive": false,
"type": "custom"
},
{
"tokenName": "Test Token 01",
"noOfBytes": "random",
"minimumNoOfBytes": "6",
"maximumNoOfBytes": "100",
"tokenCharacters": "alpha-numeric",
"caseSensitive": true,
"type": "custom"
}
]
}
What are your feelings?
Scroll to Top