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": []
}
}
]
}
'{
"data": {
"id": "prop_abc",
"resourceType": "members",
"action": "create",
"signatureStatus": "pendingInitiatorSignature",
"executionStatus": null,
"threshold": 2,
"approvals": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "<string>"
}
],
"rejections": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"data": {
"policies": [
{
"name": "<string>",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"<string>"
],
"id": "<string>",
"description": "<string>",
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "PER_ITEM"
},
"initiatorSetting": {
"type": "<string>",
"memberId": "mem_123"
},
"approverSetting": {
"type": "<string>",
"memberId": "cfo_bob"
},
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "1000000000",
"destinationAddresses": [
"<string>"
]
}
}
]
},
"signingPayloads": {
"approvePayload": "<string>",
"rejectPayload": "<string>",
"initiatorPayload": "<string>"
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "member",
"id": "mem_new1",
"uri": "/api/v1/members/mem_new1"
}
]
}
}
}Creates a proposal to update existing policies. Requires the full policy object
with the id field included.
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": []
}
}
]
}
'{
"data": {
"id": "prop_abc",
"resourceType": "members",
"action": "create",
"signatureStatus": "pendingInitiatorSignature",
"executionStatus": null,
"threshold": 2,
"approvals": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "<string>"
}
],
"rejections": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"data": {
"policies": [
{
"name": "<string>",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 1,
"accountIds": [
"<string>"
],
"id": "<string>",
"description": "<string>",
"limitation": {
"hours": 24,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "PER_ITEM"
},
"initiatorSetting": {
"type": "<string>",
"memberId": "mem_123"
},
"approverSetting": {
"type": "<string>",
"memberId": "cfo_bob"
},
"tokenTransferCondition": {
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountThreshold": "1000000000",
"destinationAddresses": [
"<string>"
]
}
}
]
},
"signingPayloads": {
"approvePayload": "<string>",
"rejectPayload": "<string>",
"initiatorPayload": "<string>"
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "member",
"id": "mem_new1",
"uri": "/api/v1/members/mem_new1"
}
]
}
}
}API key authentication. Include your API key in the Authorization header.
Idempotency key for safely retrying mutation requests.
List of policies to update (must include id)
Show child attributes
Policy update proposal created
Show child attributes