Skip to main content

Whitelists API

API path/chain/whitelists/
required request headersContent-Type: application/json
Authorization: Bearer [ACC API Token]
required request paramsop_type: add_entry and remove_entry are supported
kind: Type of whitelist. developer or user are supported.
entry: EOA address to add or remove.
response codeOn success: 200 OK
On Error:
- 400 BadRequest: if a request body is empty or could not be parsed or a number of operations is greater than RequestConfig.MaxBatchLen
- 401 Unauthorized: if authorization header does not satisfy the [conditions](401 Conditions)
- 403 Forbidden: if a caller is [not authorized](403 Conditions) to perform all updates in request array (i.e., partial updates are not allowed)
- 408 RequestTimeout: with partial response, if not all responses from storage node are received before RequestConfig.TimeoutMs or Timeout header in request
- 500 InternalServerError: if fails to send an update request to the storage node, or fails to parse a response from the storage node
request example
curl --location --request POST '[API ENDPOINT]/chain/whitelists/' --header 'Authorization: Bearer [YOUR_ACC_API_KEY]' --header 'Content-Type: application/json' --data-raw '
response example - success
"The entry: 0xe93685f3bBA03016F02bD1828BaDD6195988D951 has been added to the Developers whitelist successfully"
response examples - errorResponse Code: 400 Bad Request
"errorMessage":"engine request at index [1] is not authorized",
Note: not all error responses contain response body, but if response body exists it has the above format.