---
title: "Change one Hive automation rule, or move it between draft, active and paused. Send the action to change its status, or the name and document to change what it does."
method: POST
path: "/api/v1/tools/update_keyword_rule"
---

# Change one Hive automation rule, or move it between draft, active and paused. Send the action to change its status, or the name and document to change what it does.

`POST /api/v1/tools/update_keyword_rule`

## Request

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

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `ruleId` string, required: The Hive rule to change.
  - `expectedRevision` integer, required: The revision read_keyword_rules returned for this rule.
  - `action` 'activate' | 'pause': Activate starts this rule running on real events. Leave it out to edit the rule instead.
  - `name` string
  - `document` object

## 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)
