Create a Hive AI policy
create_ai_policyIdempotent
Create one Hive AI policy. A new policy is not enabled, so nothing answers from it until an owner or admin enables it.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What to call this policy. | |
| tone | No | How it should sound. | |
| goalEvent | No | Optional goal event, or null to clear it. | |
| languages | No | The languages it may answer in. | |
| policyType | Yes | What kind of policy it is. | |
| instruction | No | What the AI is told to do. | |
| outputSchema | No | The policy output schema stored by Hive. | |
| piiRedaction | No | Redact personal information before evaluation. | |
| allowedTopics | No | What it may talk about. | |
| blockedTopics | No | What it must not. | |
| retentionDays | No | Stored result retention, from 0 to 3650 days. | |
| fallbackAction | No | What it does when it is not sure. | |
| idempotencyKey | Yes | A caller-generated unique key (8-200 characters). Reuse it only when retrying this exact write. | |
| injectionDefense | No | Enable the native injection checks. | |
| requireCitations | No | Make it cite an approved source. | |
| knowledgeSourceIds | No | Exact knowledge source ids to use; an empty list restores the native default. | |
| confidenceThreshold | No | How sure it must be, from 0 to 1. | |
| providerConnectionId | No | Saved provider connection id, or null for the workspace default. | |
| requireHumanApproval | No | Make a person approve each answer. |