> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unpublish intent rule

> Remove an intent rule from live agent execution while retaining a working draft.

Unpublishes an intent rule immediately. Fini clears its current published-version pointer and removes its agent assignments. A working draft is retained, copying the live content first when needed. No request body is required.

This is a live configuration change, not a draft edit. To resume execution, review and publish the rule again with the intended agent assignments.

## Headers

**Authorization** `string` *required*

Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.

## Path parameters

**id** `string` *required*

Intent-rule ID in your workspace.

## Response

**id** `string`

Intent-rule ID.

**status** `string`

DRAFT after unpublishing.

**currentPublishedVersionId** `string | null`

Null after unpublishing.

**botIds** `string[]`

Intentionally empty: the rule is no longer assigned to agents.

```bash cURL theme={null}
curl --request POST \
  --url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/unpublish/public' \
  --header 'Authorization: Bearer fini_your_api_key'
```

```javascript Node.js theme={null}
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/unpublish/public', {
  method: 'POST',
  headers: { Authorization: 'Bearer fini_your_api_key' }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/unpublish/public",
    headers={"Authorization": "Bearer fini_your_api_key"},
)
response.raise_for_status()
data = response.json()
```

```json 200 OK theme={null}
{
  "id": "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3",
  "name": "Refund help",
  "description": "Guide refund requests.",
  "companyId": "11111111-1111-4111-8111-111111111111",
  "isDraft": true,
  "status": "DRAFT",
  "version": 4,
  "versionId": "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e",
  "parentVersionId": "f15be201-60d8-4c7d-8b5b-66c2b7a62c34",
  "currentPublishedVersionId": null,
  "publishedAt": null,
  "isStale": false,
  "flowConfig": {
    "root": "reply",
    "nodes": {
      "reply": {
        "id": "reply",
        "name": "Refund guidance",
        "type": "ACTION",
        "subType": "PROMPT_INJECTION",
        "prompt": "Explain the approved refund policy."
      }
    }
  },
  "botIds": [],
  "createdAt": "2026-10-28T10:00:00.000Z",
  "updatedAt": "2026-10-29T12:00:00.000Z"
}
```

## Errors

400 if the rule is not published; 404 if the rule does not exist in your workspace.

All requests can return 401 for an invalid or revoked key, or 403 when the required scope is missing.


## Related topics

- [Overview](https://docs.usefini.com/en/api-reference/intent-rules.md)
- [API overview](https://docs.usefini.com/en/api-reference/overview.md)
- [Intent Rules](https://docs.usefini.com/en/automations/rulebook.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.