> ## Documentation Index
> Fetch the complete documentation index at: https://help.primevault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating to the Policy Rule-Based Framework (v1.5)

Your organization has been onboarded to the more flexible **Policy Rule-Based Framework**. This guide covers what changed on the platform and the API updates you need to integrate.

Help center article: [https://docs.primevault.com/help-center/policy-engine](https://help.primevault.com/policy-engine.md)

## User onboarding & device registration

Login now triggers verification emails, and users are activated through a device-registration flow:

* The **first user** to log into the mobile app is **approved automatically** and becomes active right away.
* For **every subsequent user**, after they setup and login, we create **a device-registration request**. An admin simply approves that request for the user to become active.

This extra step ensures every new user is verified before gaining access to the platform.

## What changed at a glance

## 1) Vaults

* templateId is **no longer required** — remove it from your createVault payload.
* To add a vault to vault groups, pass the new vaultGroupIds param (array of group IDs from the UI).
* Vault creation now needs approval — do it as **2 separate calls**, then poll for wallets:

  // 2. Approve the change request await apiClient.createVaultApproval(vault);

## 2) Contacts

* To add a contact to contact groups, pass the contactGroupIds param on create.
* Contact creation needs approval — **2 separate calls**:
  ```javascript theme={null}
  const contact = await apiClient.createContact({ name, address, chain, assetList, contactGroupIds });
  await apiClient.createContactApproval(contact);
  ```
* To update the contact groups on an already-created contact:
  ```javascript theme={null}
  const contact = await apiClient.updateContact({ id, contactGroupIds });
  await apiClient.createContactApproval(contact);
  ```

## 3) Transactions

* Create a transfer:
  ```javascript theme={null}
  const txn = await apiClient.createTransferTransaction({ source, destination, amount, asset, chain });
  ```
* After creation the transaction is PENDING; approve it:
  ```javascript theme={null}
  await apiClient.approveChangeRequest({ entityId: txn.id, action: ApprovalAction.APPROVE });
  ```

## 4) Webhook structure

Webhook events now use version: "2.0.0" with the following transaction payload:

```json theme={null}
{
  "event": "TRANSACTION_STATUS_CHANGED",
  "version": "2.0.0",
  "eventId": "<uuid>",
  "data": {
    "transaction": {
      "id": "<uuid>",
      "orgId": "<uuid>",
      "orgEntityId": "<uuid>",
      "vaultId": "<uuid>",
      "toAddress": "<address>",
      "status": "COMPLETED",
      "blockChain": "ETHEREUM",
      "txHash": "<hash>",
      "asset": "ETH",
      "amount": "0.0001",
      "amountInUSD": "3",
      "transactionType": "OUTGOING",
      "category": "TRANSFER",
      "fees": {
        "amount": "0.001",
        "asset": "ETH"
      },
      "operations": [
        {
          "source": {},
          "destination": {},
          "balanceChanges": { "changes": [] },
          "sequence": 1,
          "type": "TRANSFER",
          "status": "COMPLETED"
        }
      ]
    }
  }
}
```

## Migration checklist


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.