Replace Policy

Replaces all rules in an existing policy by id. <Note title="Header Access Token"> To call this endpoint, you must use your [access token](/docs/how-to-create-access-keys) in the [authorization header](/docs/how-to-use-api-keys-in-http-headers) of the API request. </Note>

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequiredDefaults to a844e221-3c13-40c6-95db-d2db390e14b5
ID of the policy to be replaced

Request

This endpoint expects an object.
policyNamestringOptionalDefaults to My Policy
Name of the policy
rulesobjectOptional

Rules for “sponsorship” policy type. Empty if policyType is not “sponsorship”.

networkslist of stringsOptional

Networks for the policy. Example: ETH_MAINNET. For Solana policies, valid values are SOLANA_MAINNET and SOLANA_DEVNET.

solana_rulesobjectOptional

Rules for solana policy type. Empty if policyType is not solana.

erc20_rulesobjectOptional

Rules for erc20 policy type. Empty if policyType is not erc20.

Response

Policy rules replaced successfully
dataobject or null
errorobject or null