Policies

Create Policy

Create a new policy entry. The policy will be associated with the organization of the API key.

POST
/v1/policies

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication for API access.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/policies" \  -H "Content-Type: application/json" \  -d '{    "title": "Privacy Policy",    "content": "This is the content of the policy"  }'
{  "policy": {    "id": 123,    "title": "Privacy Policy",    "content": "This is the content of the policy",    "isActive": true  }}
{  "success": false,  "message": "Invalid or expired token",  "error": {    "status": 401,    "message": "Invalid or expired token"  }}
{  "success": false,  "message": "Internal server error",  "error": {    "status": 500,    "message": "Internal server error"  }}