curl --request POST \
--url https://api.onchainden.com/api/v1/policies/proposals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"policies": [
{
"name": "<string>",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 123,
"accountIds": [
"<string>"
],
"id": "<string>",
"description": "<string>",
"limitation": {
"hours": 123,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "PER_ITEM"
},
"initiatorSetting": {
"type": "<string>",
"memberId": "<string>"
},
"approverSetting": {
"type": "<string>",
"memberId": "<string>"
},
"tokenTransferCondition": {
"tokenAddress": "<string>",
"tokenDecimals": 123,
"amountThreshold": "<string>",
"destinationAddresses": [
"<string>"
]
},
"contractInteractionCondition": [
{
"contractAddress": "<string>",
"allowedFunctions": [
"<string>"
]
}
]
}
]
}
'{
"data": {
"id": "<string>",
"resourceType": "members",
"action": "create",
"signatureStatus": "pendingInitiatorSignature",
"executionStatus": null,
"threshold": 123,
"approvals": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "0xabc...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rejections": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "0xabc...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"data": {
"items": [
{
"name": "<string>",
"walletAddress": "<string>"
}
]
},
"signingPayloads": {
"approvePayload": "<string>",
"rejectPayload": "<string>",
"initiatorPayload": "<string>"
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "<string>",
"id": "<string>",
"uri": "<string>"
}
]
}
}
}Create a proposal to replace the entire policy set. Include existing policy ids to preserve them; omit ids to create new policies; omit a policy from the set to delete it on execution.
curl --request POST \
--url https://api.onchainden.com/api/v1/policies/proposals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"policies": [
{
"name": "<string>",
"type": "AUTO_APPROVAL",
"transactionType": "TOKEN_TRANSFER",
"networkId": 123,
"accountIds": [
"<string>"
],
"id": "<string>",
"description": "<string>",
"limitation": {
"hours": 123,
"initiatorScope": "PER_ITEM",
"sourceAccountScope": "PER_ITEM",
"destinationScope": "PER_ITEM"
},
"initiatorSetting": {
"type": "<string>",
"memberId": "<string>"
},
"approverSetting": {
"type": "<string>",
"memberId": "<string>"
},
"tokenTransferCondition": {
"tokenAddress": "<string>",
"tokenDecimals": 123,
"amountThreshold": "<string>",
"destinationAddresses": [
"<string>"
]
},
"contractInteractionCondition": [
{
"contractAddress": "<string>",
"allowedFunctions": [
"<string>"
]
}
]
}
]
}
'{
"data": {
"id": "<string>",
"resourceType": "members",
"action": "create",
"signatureStatus": "pendingInitiatorSignature",
"executionStatus": null,
"threshold": 123,
"approvals": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "0xabc...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rejections": [
{
"id": "mem_123",
"name": "Alice",
"type": "user",
"walletAddress": "0xabc...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"data": {
"items": [
{
"name": "<string>",
"walletAddress": "<string>"
}
]
},
"signingPayloads": {
"approvePayload": "<string>",
"rejectPayload": "<string>",
"initiatorPayload": "<string>"
},
"result": {
"resolution": "approved",
"resources": [
{
"type": "<string>",
"id": "<string>",
"uri": "<string>"
}
]
}
}
}API key authentication. Include your API key in the Authorization header.
Idempotency key for safely retrying mutation requests.
Show child attributes
Policy proposal created
Show child attributes