Policies

Bulk Import Policies

POST
/policies/bulk-import

Bulk import multiple policies from JSON.

IDs from the import are ignored; new IDs will be generated for each policy. Returns a summary of successful and failed imports. Requires admin role.

Docs: Guide | API Reference

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for bulk importing multiple policies.

Response Body

application/json

application/json

curl -X POST "https://example.com/policies/bulk-import" \  -H "Content-Type: application/json" \  -d '{    "policies": [      {        "name": "string"      }    ]  }'
{  "total": 0,  "successful": 0,  "failed": 0,  "results": [    {      "name": "string",      "success": true,      "id": "string",      "error": "string"    }  ]}