Skip to main content
POST
/
policy
/
draft
TypeScript
const response: Promise<FireblocksResponse<PublishResult>> = fireblocks.policyEditorV2Beta.publishDraft(policyEditorV2BetaApiPublishDraftRequest);
{
  "status": "SUCCESS",
  "rules": [
    {
      "name": "High Value Transfer Policy",
      "id": "policy_rule_001",
      "policyEngineVersion": "v2",
      "type": "TRANSFER",
      "initiator": "*",
      "source": {
        "operator": "INCLUDES",
        "type": [
          "VAULT",
          "UNMANAGED"
        ],
        "subType": [
          {
            "type": "VAULT",
            "id": "account123",
            "subType": "INTERNAL",
            "address": "0x123..."
          }
        ],
        "ids": [
          {
            "type": "VAULT",
            "id": "account123",
            "subType": "INTERNAL",
            "address": "0x123..."
          }
        ],
        "tags": [
          {
            "id": "tag_001"
          }
        ],
        "matchFrom": "ACCOUNT"
      },
      "verdict": {
        "action": "ALLOW",
        "approvers": {
          "canInitiatorApprove": false,
          "operator": "AND",
          "allowOperatorAsAuthorizer": false,
          "approvalGroups": [
            {
              "threshold": 2,
              "users": [
                "user1",
                "user2"
              ]
            }
          ]
        },
        "designatedSigners": {
          "type": "SINGLE",
          "users": [
            "user1",
            "user2"
          ],
          "groups": [
            "group1",
            "group2"
          ]
        }
      },
      "subType": "TRANSFER",
      "asset": {
        "nftTransfer": false,
        "assetTypes": [
          "FUNGIBLE",
          "NFT",
          "*"
        ],
        "operator": "INCLUDES"
      },
      "destination": {
        "type": [
          "EXTERNAL"
        ],
        "operator": "INCLUDES",
        "addressType": "WHITELISTED"
      },
      "account": {
        "operator": "INCLUDES",
        "type": [
          "VAULT"
        ],
        "subType": [
          {
            "type": "VAULT",
            "id": "account123",
            "subType": "INTERNAL",
            "address": "0x123..."
          }
        ],
        "ids": [
          {
            "type": "VAULT",
            "id": "account123",
            "subType": "INTERNAL",
            "address": "0x123..."
          }
        ],
        "tags": [
          {
            "id": "tag_001"
          }
        ],
        "matchFrom": "ACCOUNT"
      },
      "side": "BUY",
      "amountOverTime": {
        "range": {
          "min": "100",
          "max": "10000"
        },
        "currency": "USD",
        "timePeriod": {
          "seconds": "86400",
          "initiator": "PER_SINGLE_MATCH",
          "source": "PER_SINGLE_MATCH",
          "destination": "PER_SINGLE_MATCH"
        }
      },
      "amount": {
        "range": {
          "min": "100",
          "max": "10000"
        },
        "currency": "USD"
      },
      "externalDescriptor": "High value transfer policy for institutional clients",
      "method": "*",
      "isGlobalPolicy": false,
      "programCall": {
        "allowedSolanaProgramCalls": "WHITELISTED"
      },
      "screeningMetadata": {
        "direction": "OUTBOUND",
        "provider": "CHAINALYSIS",
        "riskRating": "MEDIUM",
        "riskScore": "0.8",
        "exposureType": "DIRECT",
        "category": [
          "<string>"
        ],
        "name": [
          "<string>"
        ],
        "categoryId": [
          "<string>"
        ],
        "status": "COMPLETED",
        "sourceAddress": "0x123...",
        "destAddress": "0x456..."
      },
      "quoteAsset": {
        "nftTransfer": false,
        "assetTypes": [
          "FUNGIBLE",
          "NFT",
          "*"
        ],
        "operator": "INCLUDES"
      },
      "baseAsset": {
        "nftTransfer": false,
        "assetTypes": [
          "FUNGIBLE",
          "NFT",
          "*"
        ],
        "operator": "INCLUDES"
      },
      "quoteAmount": {
        "range": {
          "min": "100",
          "max": "10000"
        }
      },
      "baseAmount": {
        "range": {
          "min": "100",
          "max": "10000"
        }
      },
      "dAppAddress": {
        "globalWhitelisted": [
          "rabby.io",
          "jup.ag"
        ],
        "tenantWhitelisted": [
          "uniswap.com",
          "opensea.io"
        ],
        "urls": [
          "*"
        ],
        "operator": "INCLUDES"
      },
      "derivationPath": {
        "path": [
          44,
          0,
          0,
          0,
          0
        ],
        "partial": false
      },
      "index": 1
    }
  ],
  "checkResult": {
    "errors": 123,
    "results": [
      {
        "index": 123,
        "status": "ok",
        "errors": [
          {
            "errorMessage": "<string>",
            "errorCode": 123,
            "errorCodeName": "<string>",
            "errorField": "operator"
          }
        ]
      }
    ]
  },
  "metadata": {
    "policyType": "TRANSFER",
    "editedBy": "user123",
    "editedAt": "2024-01-15T10:30:00Z",
    "publishedBy": "user456",
    "publishedAt": "2024-01-15T11:00:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Idempotency-Key
string

A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.

Body

application/json

Request schema for publishing draft with policy types and draft ID

policyTypes
enum<string>[]
required

Policy type enumeration

Available options:
TRANSFER,
STAKE,
CONTRACT_CALL,
TYPED_MESSAGE,
APPROVE,
MINT,
BURN,
RAW,
COMPLIANCE,
DEPLOYMENT,
PROGRAM_CALL,
DAPP_CONNECTION,
UPGRADE,
ORDER,
AML_CHAINALYSIS_V2_SCREENING,
AML_CHAINALYSIS_V2_POST_SCREENING,
AML_ELLIPTIC_HOLISTIC_SCREENING,
AML_ELLIPTIC_HOLISTIC_POST_SCREENING,
TR_NOTABENE_SCREENING,
TR_NOTABENE_POST_SCREENING
draftId
string
required

The ID of the draft to publish

Example:

"draft-123"

Response

A policy publish result object

Response object of the publish policy operation

status
enum<string>
required
  • SUCCESS - success
  • UNVALIDATED - not validated yet
  • INVALID_CONFIGURATION - at least one rule is invalid
  • PENDING - pending approval
  • PENDING_CONSOLE_APPROVAL - pending approval from the console app
  • AWAITING_QUORUM - pending quorum approval
  • UNHANDLED_ERROR - unhandled error
Available options:
SUCCESS,
UNVALIDATED,
INVALID_CONFIGURATION,
PENDING,
PENDING_CONSOLE_APPROVAL,
AWAITING_QUORUM,
UNHANDLED_ERROR
rules
object[]
required
checkResult
object
required

Policy rules validation result

metadata
object
required

Policy metadata