Create Policy

Creates a new gas manager policy with the specified rules. Returns the policy id of a successfully created policy. The newly created policy will be in the “inactive” status.

Headers

AuthorizationstringRequired

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

Request

This endpoint expects an object.
policyNamestringOptionalDefaults to My Policy

Name of the policy

policyTypestringOptionalDefaults to sponsorship

Type of the policy (e.g. “sponsorship”). Currently we support “sponsorship” (for EVM network policies) and “solana” (for Solana network policies).

appIdstringOptionalDefaults to 6d834x9k1yh4dx6z

ID for the app associated with the new policy. Learn how to find your app ID here.

rulesobjectOptional

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

solanaRulesobjectOptional

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

networkslist of stringsOptional

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

Response

Policy created successfully

dataobjectOptional
errorobjectOptional