Update a role

Grant a role to vaults, revoke it, or both, in one transaction that needs one approval in io.sign. grant and revoke each take up to 20 vault IDs, and a longer list fails validation with 400. io-network-erc20 tokens accept one change per request, so to move a role, grant it to the new vault first and then revoke it from the old one. More than one change for an io-network-erc20 token returns 409 CAPABILITY_UNSUPPORTED. Building first is optional: omit transaction to build and submit in one call, or build with POST .../roles/build, review the result, and send it unchanged as transaction.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
length ≥ 1

Token ID.

Body Params
string
required
length between 1 and 128

Role to change. Use one of the standard's role constants from GET .../roles, or AUTHORITY_ROLE to change the authority vault. For AUTHORITY_ROLE, send one grant with the new authority vault and one revoke with the current one. Standards that do not support an authority change return 409 AUTHORITY_CHANGE_UNSUPPORTED. Admin roles such as DEFAULT_ADMIN_ROLE are rejected.

grant
array of strings
length ≤ 20
Defaults to []

Vault IDs to grant the role to, up to 20. io-network-erc20 tokens accept one change per request, counting grant and revoke together.

grant
revoke
array of strings
length ≤ 20
Defaults to []

Vault IDs to revoke the role from, up to 20. io-network-erc20 tokens accept one change per request, counting grant and revoke together.

revoke
boolean
Defaults to false

Set to true to simulate the transaction, as sent by the signing vault, before anything is signed. A predicted revert returns 422 SIMULATION_REVERTED, for example when the recipient is not on the allowlist, the vault does not hold the role, or the token is paused. On io.chain this is the only revert check before signing. On public chains a transaction that would revert is refused even without this flag. If the simulation cannot run, the call returns 503 SIMULATION_UNAVAILABLE and nothing is built or submitted. Defaults to false.

transaction
object

The unsigned transaction from the matching /build endpoint, sent unchanged. Omit it to build and submit in one call.

Headers
string
length between 1 and 255

Key that makes this call safe to retry. Repeating the key with the same body returns the original response without running the operation again. Reusing the key with a different body is refused. Keys are scoped to you and this operation, so the same key on another operation does not collide. Keys expire some time after the original call completes. An empty or whitespace-only value is rejected. Maximum length: 255 characters.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json