Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/accessmanagement/postapi-v-1-iga-policies

# Create a policy

POST `https://{tenant}.atomicwork.com/api/v1/iga/policies`

Create a new identity policy. Requires name, type, and status.
Policies define access rules and can be associated with entitlements.

## Authorization

#### X-Api-Key (header, string, required)

## Headers

#### X-Workspace-Id (header, string)

## Body

#### name (body, string, required)

Name of the policy

#### description (body, string)

Description of the policy

#### type (body, enum (string), required)

#### condition (body, object)

#### approvals (body, object)

#### lifecycle (body, object)

#### status (body, enum (string), required)

#### is\_active (body, boolean)

Whether the policy is active

#### entitlements (body, array of integer)

List of entitlement IDs to associate with this policy

#### app\_id (body, integer, required)

ID of the identity resource app this policy belongs to

#### is\_business\_justification\_required (body, boolean)

Whether business justification is required for requests under this policy

## Response

#### 200

Successful response

#### Request

```bash cURL
curl -X POST 'https://{tenant}.atomicwork.com/api/v1/iga/policies' \
  -H 'X-Api-Key: <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "string", "description": "string", "type": "BIRTH_RIGHT", "condition": {}, "approvals": {}, "lifecycle": {}, "status": "DRAFT", "is_active": true, "entitlements": [0], "app_id": 0, "is_business_justification_required": true}'
```

```javascript JavaScript
const res = await fetch('https://{tenant}.atomicwork.com/api/v1/iga/policies', {
  method: 'POST',
  headers: {
    'X-Api-Key': '<api-key>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "string", "description": "string", "type": "BIRTH_RIGHT", "condition": {}, "approvals": {}, "lifecycle": {}, "status": "DRAFT", "is_active": true, "entitlements": [0], "app_id": 0, "is_business_justification_required": true}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://{tenant}.atomicwork.com/api/v1/iga/policies',
    headers={'X-Api-Key': '<api-key>'},
    json={"name": "string", "description": "string", "type": "BIRTH_RIGHT", "condition": {}, "approvals": {}, "lifecycle": {}, "status": "DRAFT", "is_active": true, "entitlements": [0], "app_id": 0, "is_business_justification_required": true}
)
data = res.json()
```
