---
title: "Change one Hive AI policy. Enabling one is refused unless the person is an owner or admin."
method: POST
path: "/api/v1/tools/update_ai_policy"
---

# Change one Hive AI policy. Enabling one is refused unless the person is an owner or admin.

`POST /api/v1/tools/update_ai_policy`

## Request

- Base URL: `https://hivepublish.com`
- URL: `https://hivepublish.com/api/v1/tools/update_ai_policy`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `goalEvent` string, nullable: Optional goal event, or null to clear it.
  - `providerConnectionId` string, nullable: Saved provider connection id, or null for the workspace default.
  - `knowledgeSourceIds` string[]: Exact knowledge source ids to use; an empty list restores the native default.
  - `outputSchema` object: The policy output schema stored by Hive.
  - `piiRedaction` boolean: Redact personal information before evaluation.
  - `injectionDefense` boolean: Enable the native injection checks.
  - `retentionDays` integer: Stored result retention, from 0 to 3650 days.
  - `policyId` string, required: The policy to change.
  - `name` string
  - `instruction` string
  - `policyType` string
  - `allowedTopics` string[]
  - `blockedTopics` string[]
  - `languages` string[]
  - `tone` string
  - `confidenceThreshold` number
  - `requireCitations` boolean
  - `requireHumanApproval` boolean
  - `fallbackAction` string
  - `status` 'draft' | 'enabled' | 'paused' | 'archived' | 'disabled': Native lifecycle status. The legacy disabled value is accepted as paused.

## Response `200`

Tool result

- ToolResult
  - `data` unknown, required
  - `meta` object, required
    - `tool` string
    - `workspaceId` string, uuid

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid credential
- `403`: Missing workspace scope, role permission, or plan entitlement
- `409`: Idempotency conflict, replay, or request still in progress
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hivepublish/apis/hive-developer-api.md) · [All operations](https://skmtc.dev/hivepublish/apis/hive-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hivepublish/apis/hive-developer-api/revisions/b440c763583e?raw)
