# Create Policy

`POST /v2/policies`

{% hint style="info" %}

* User action signature required. See [User Action Signing](/d/api-docs/authentication/user-action-signing.md) for more information.
* Request headers required. See [Request Headers](/d/advanced-topics/authentication/request-headers.md) for more information.
* Authentication required. See [Authentication Headers](/d/advanced-topics/authentication/request-headers.md#authentication-headers) for more information.
  {% endhint %}

## Required Permissions

| Name              | Conditions      |
| ----------------- | --------------- |
| `Policies:Create` | Always Required |

## Body <a href="#request-body" id="request-body"></a>

<table><thead><tr><th width="183">Property</th><th width="159">Type / Optional</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code><mark style="color:red;">*</mark></td><td>String</td><td>A name for the Policy.</td></tr><tr><td><code>activityKind</code><mark style="color:red;">*</mark></td><td>String</td><td>The kind of activity that the policy will be evaluating and guarding. See <a href="/pages/kJ4P9U9pp4jkXMZTCG7P#activities">Activities</a> for all supported values.</td></tr><tr><td><code>rule</code><mark style="color:red;">*</mark></td><td>Object</td><td>See <a href="/pages/kJ4P9U9pp4jkXMZTCG7P#policy-rules">Policy Rules</a> for all supported rules.</td></tr><tr><td><code>action</code><mark style="color:red;">*</mark></td><td>Object</td><td>The action that will be taken if a policy is triggered. See <a href="/pages/kJ4P9U9pp4jkXMZTCG7P#policy-action">Policy Actions</a> for supported actions</td></tr><tr><td><code>filters</code></td><td>Object</td><td>Reduces the scope on which the policy applies. See <a href="/pages/kJ4P9U9pp4jkXMZTCG7P#policy-filters">Policy Filters</a> for supported filters</td></tr></tbody></table>

**Example**

```json
{
  "name": "Transfer Limit",
  "activityKind": "Wallets:Sign",
  "rule": {
    "kind": "TransactionAmountLimit",
    "configuration": {
      "currency": "USD",
      "limit": "1000"
    }
  },
  "action": {
    "kind": "RequestApproval",
    "autoRejectTimeout": 60
    "approvalGroups": [
      {
        "name": "Admins",
        "quorum": 2,
        "approvers": {
          "userId": {
            "in": ["us-...1", "us-...2", "us-...3"]
          }
        }
      }
    ],
  },
  "filters": {
    "walletId": {
      "in": ["wa-...1", "wa-...2"]
    }
  }
}
```

## Response <a href="#response" id="response"></a>

### Response example <a href="#response-example" id="response-example"></a>

```json
{
  "id": "plc-...",
  "name": "Transfer Limit",
  "status": "Active",
  "activityKind": "Wallets:Sign",
  "rule": {
    "kind": "TransactionAmountLimit",
    "configuration": {
      "currency": "USD",
      "limit": "1000"
    }
  },
  "action": {
    "kind": "RequestApproval",
    "autoRejectTimeout": 60,
    "approvalGroups": [
      {
        "name": "Admins",
        "quorum": 2,
        "approvers": {
          "userId": {
            "in": ["us-...1", "us-...2", "us-...3"]
          }
        }
      }
    ],
  },
  "filters": {
    "walletId": {
      "in": ["wa-...1", "wa-...2"]
    }
  },
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-legacy.dfns.co/d/api-docs/policy-engine/api-reference/create-policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
