PUT
/
update-policy

Example values you can use to demo the API:

{
    "id": "1",
    "walletAddress": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
    "name": "Sample Policy",
    "description": "This is a sample policy modified",
    "isPublic": true,
    "isEnabled": true,
    "isApplicableToAllNetworks": false,
    "enabledChains": [
        80002
    ],
    "supportedEPVersions": ["EPV_06", "EPV_07"],
    "isPerpetual": false,
    "startTime": "2024-06-26T00:40:00.000Z",
    "endTime": "2024-06-27T23:59:59.999Z",
    "globalMaximumApplicable": true,
    "globalMaximumUsd": 6000,
    "globalMaximumNative": 2000,
    "globalMaximumOpCount": 1000,
    "perUserMaximumApplicable": true,
    "perUserMaximumUsd": 100,
    "perUserMaximumNative": 200,
    "perUserMaximumOpCount": 50,
    "perOpMaximumApplicable": true,
    "perOpMaximumUsd": 10,
    "perOpMaximumNative": 20
}

Example response:

{
    "createdAt": "2024-06-30T17:39:26.938Z",
    "updatedAt": "2024-06-30T17:39:26.939Z",
    "id": 5,
    "walletAddress": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
    "name": "Sample Policy",
    "description": "This is a sample policy",
    "isPublic": true,
    "isEnabled": true,
    "isApplicableToAllNetworks": false,
    "enabledChains": [
        80002
    ],
    "supportedEPVersions": [
        "EPV_06",
        "EPV_07"
    ],
    "isPerpetual": false,
    "startTime": "2024-06-26T00:40:00.000Z",
    "endTime": "2024-06-27T23:59:59.999Z",
    "globalMaximumApplicable": true,
    "globalMaximumUsd": "5000.0000",
    "globalMaximumNative": "1000.000000000000000000",
    "globalMaximumOpCount": 1000,
    "perUserMaximumApplicable": true,
    "perUserMaximumUsd": "100.0000",
    "perUserMaximumNative": "200.000000000000000000",
    "perUserMaximumOpCount": 50,
    "perOpMaximumApplicable": true,
    "perOpMaximumUsd": "10.0000",
    "perOpMaximumNative": "20.000000000000000000",
    "addressAllowList": null,
    "addressBlockList": null
}

Headers

apikey
string
required

API key for authentication

Body

application/json
id
integer

ID of the policy

walletAddress
string

The wallet address associated with the API key

name
string

Name of the sponsorship policy

description
string

Description of the sponsorship policy

isPublic
boolean

Flag to indicate if the policy is public

isEnabled
boolean

Flag to indicate if the policy is enabled

isApplicableToAllNetworks
boolean

Flag to indicate if the policy is universal

enabledChains
integer[]

Array of enabled chain IDs

supportedEPVersions
string[]

Array of supported entry point versions

isPerpetual
boolean

Flag to indicate if the policy is perpetual

startTime
string | null

Optional start date for the policy

endTime
string | null

Optional end date for the policy

globalMaximumApplicable
boolean

Flag to indicate if the global maximum is applicable

globalMaximumUsd
number | null

Optional global maximum USD limit

globalMaximumNative
number | null

Optional global maximum native limit

globalMaximumOpCount
number | null

Optional global maximum operation count

perUserMaximumApplicable
boolean

Flag to indicate if the per user maximum is applicable

perUserMaximumUsd
number | null

Optional per user maximum USD limit

perUserMaximumNative
number | null

Optional per user maximum native limit

perUserMaximumOpCount
number

Optional per user maximum operation count

perOpMaximumApplicable
boolean

Flag to indicate if the per operation maximum is applicable

perOpMaximumUsd
number | null

Optional per operation maximum USD limit

perOpMaximumNative
number | null

Optional per operation maximum native limit

addressAllowList
string[] | null

Optional array of allowed addresses

addressBlockList
string[] | null

Optional array of blocked addresses

isExpired
boolean

Flag to indicate if the policy is expired

isCurrent
boolean

Flag to indicate if the policy is current

isApplicable
boolean

Flag to indicate if the policy is applicable

createdAt
string

Date the policy was created

updatedAt
string

Date the policy was last updated

Response

200 - application/json
id
integer

ID of the policy

walletAddress
string

The wallet address associated with the API key

name
string

Name of the sponsorship policy

description
string

Description of the sponsorship policy

isPublic
boolean

Flag to indicate if the policy is public

isEnabled
boolean

Flag to indicate if the policy is enabled

isApplicableToAllNetworks
boolean

Flag to indicate if the policy is universal

enabledChains
integer[]

Array of enabled chain IDs

supportedEPVersions
string[]

Array of supported entry point versions

isPerpetual
boolean

Flag to indicate if the policy is perpetual

startTime
string | null

Optional start date for the policy

endTime
string | null

Optional end date for the policy

globalMaximumApplicable
boolean

Flag to indicate if the global maximum is applicable

globalMaximumUsd
number | null

Optional global maximum USD limit

globalMaximumNative
number | null

Optional global maximum native limit

globalMaximumOpCount
number | null

Optional global maximum operation count

perUserMaximumApplicable
boolean

Flag to indicate if the per user maximum is applicable

perUserMaximumUsd
number | null

Optional per user maximum USD limit

perUserMaximumNative
number | null

Optional per user maximum native limit

perUserMaximumOpCount
number

Optional per user maximum operation count

perOpMaximumApplicable
boolean

Flag to indicate if the per operation maximum is applicable

perOpMaximumUsd
number | null

Optional per operation maximum USD limit

perOpMaximumNative
number | null

Optional per operation maximum native limit

addressAllowList
string[] | null

Optional array of allowed addresses

addressBlockList
string[] | null

Optional array of blocked addresses

isExpired
boolean

Flag to indicate if the policy is expired

isCurrent
boolean

Flag to indicate if the policy is current

isApplicable
boolean

Flag to indicate if the policy is applicable

createdAt
string

Date the policy was created

updatedAt
string

Date the policy was last updated