Policies
Propose updating policies
[Admin Only] Creates a proposal to update existing policies. Requires the full policy object
with the id field included.
Only admin API members can make requests to this endpoint.
POST
/
policies
/
proposals
/
update
cURL
curl --request POST \
--url https://api.onchainden.com/api/v1/policies/proposals/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"policies": [
{
"id": "pol_123",
"name": "Auto-approve Small Transfers",
"description": "Auto-approve USDC transfers under $2000",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"acc_1",
"acc_2"
],
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "ALL_ITEMS"
},
"initiatorSetting": {
"type": "group",
"groupId": "grp_finance"
},
"approverSetting": null,
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "2000000000",
"destinationAddresses": []
}
}
]
}
'const client = new DenClient({ apiKey: 'ck_live_...' });
const proposal = await client.createUpdatePoliciesProposal({
changes: [
{
action: 'update',
data: {
id: 'pol_123',
name: 'Auto-approve Small Transfers',
description: 'Auto-approve USDC transfers under $2000',
type: 'AUTO_APPROVAL',
transactionType: 'TOKEN_TRANSFER',
networkId: 1,
accountIds: ['acc_1', 'acc_2'],
limitation: {
hours: 24,
initiatorScope: 'PER_ITEM',
sourceAccountScope: 'PER_ITEM',
destinationScope: 'ALL_ITEMS',
},
initiatorSetting: { type: 'group', groupId: 'grp_finance' },
approverSetting: null,
tokenTransferCondition: {
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amountThreshold: '2000000000',
destinationAddresses: [],
},
},
},
],
});
{
"data": {
"id": "prop_pol_update_123",
"resourceType": "policies",
"action": "update",
"signatureStatus": "approvalReady",
"executionStatus": "completed",
"threshold": 2,
"approvals": [],
"rejections": [],
"createdAt": "2026-01-18T00:00:00.000Z",
"expiresAt": "2026-01-25T00:00:00.000Z",
"data": {
"policies": [
{
"id": "pol_123",
"name": "Auto-approve Small Transfers",
"description": "Auto-approve USDC transfers under $2000",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"acc_1",
"acc_2"
],
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "ALL_ITEMS"
},
"initiatorSetting": {
"type": "group",
"groupId": "grp_finance"
},
"approverSetting": null,
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "2000000000",
"destinationAddresses": []
}
}
]
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "policy",
"id": "pol_123",
"uri": "/api/v1/policies/pol_123"
}
]
}
}
}Authorizations
API key authentication. Include your API key in the Authorization header.
Headers
Idempotency key for safely retrying mutation requests.
Body
application/json
policies
(Token Transfer · object | Contract Interaction · object | Any Transaction · object)[]
required
List of policies to update (must include id)
- Token Transfer
- Contract Interaction
- Any Transaction
Show child attributes
Show child attributes
Response
Policy update proposal created
Show child attributes
Show child attributes
Example:
{
"id": "prop_pol_update_123",
"resourceType": "policies",
"action": "update",
"signatureStatus": "approvalReady",
"executionStatus": "completed",
"threshold": 2,
"approvals": [],
"rejections": [],
"createdAt": "2026-01-18T00:00:00.000Z",
"expiresAt": "2026-01-25T00:00:00.000Z",
"data": {
"policies": [
{
"id": "pol_123",
"name": "Auto-approve Small Transfers",
"description": "Auto-approve USDC transfers under $2000",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": ["acc_1", "acc_2"],
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "ALL_ITEMS"
},
"initiatorSetting": { "type": "group", "groupId": "grp_finance" },
"approverSetting": null,
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "2000000000",
"destinationAddresses": []
}
}
]
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "policy",
"id": "pol_123",
"uri": "/api/v1/policies/pol_123"
}
]
}
}
⌘I
cURL
curl --request POST \
--url https://api.onchainden.com/api/v1/policies/proposals/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"policies": [
{
"id": "pol_123",
"name": "Auto-approve Small Transfers",
"description": "Auto-approve USDC transfers under $2000",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"acc_1",
"acc_2"
],
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "ALL_ITEMS"
},
"initiatorSetting": {
"type": "group",
"groupId": "grp_finance"
},
"approverSetting": null,
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "2000000000",
"destinationAddresses": []
}
}
]
}
'const client = new DenClient({ apiKey: 'ck_live_...' });
const proposal = await client.createUpdatePoliciesProposal({
changes: [
{
action: 'update',
data: {
id: 'pol_123',
name: 'Auto-approve Small Transfers',
description: 'Auto-approve USDC transfers under $2000',
type: 'AUTO_APPROVAL',
transactionType: 'TOKEN_TRANSFER',
networkId: 1,
accountIds: ['acc_1', 'acc_2'],
limitation: {
hours: 24,
initiatorScope: 'PER_ITEM',
sourceAccountScope: 'PER_ITEM',
destinationScope: 'ALL_ITEMS',
},
initiatorSetting: { type: 'group', groupId: 'grp_finance' },
approverSetting: null,
tokenTransferCondition: {
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amountThreshold: '2000000000',
destinationAddresses: [],
},
},
},
],
});
{
"data": {
"id": "prop_pol_update_123",
"resourceType": "policies",
"action": "update",
"signatureStatus": "approvalReady",
"executionStatus": "completed",
"threshold": 2,
"approvals": [],
"rejections": [],
"createdAt": "2026-01-18T00:00:00.000Z",
"expiresAt": "2026-01-25T00:00:00.000Z",
"data": {
"policies": [
{
"id": "pol_123",
"name": "Auto-approve Small Transfers",
"description": "Auto-approve USDC transfers under $2000",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"acc_1",
"acc_2"
],
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "ALL_ITEMS"
},
"initiatorSetting": {
"type": "group",
"groupId": "grp_finance"
},
"approverSetting": null,
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "2000000000",
"destinationAddresses": []
}
}
]
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "policy",
"id": "pol_123",
"uri": "/api/v1/policies/pol_123"
}
]
}
}
}