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

# Duplicate rule

> Create a copy of an existing rule.

Creates a copy of one existing rule.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Rule ID to duplicate.
</ParamField>

## Body parameters

<ParamField body="name" type="string">
  Optional name override for the duplicated rule.
</ParamField>

<ParamField body="description" type="string">
  Optional description override for the duplicated rule.
</ParamField>

## Response

Returns the duplicated [`Rule`](/en/api-reference/rules#rule-object).

<Note>
  Current controller behavior:

  * Duplicating an `intent` rule creates a **draft** copy.
  * Duplicating a `business` rule creates a non-draft copy.
  * The duplicate response is returned directly from storage, so `botIds` are not expanded. Call [Get rule](/en/api-reference/get-rule) if you need the enriched read shape.
</Note>

## Errors

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    Current service behavior: template-based rules cannot be duplicated.
  </Accordion>

  <Accordion title="401 Unauthorized" icon="lock">
    The API key is missing, malformed, revoked, or invalid.
  </Accordion>

  <Accordion title="403 Forbidden" icon="shield-halved">
    The API key does not include the `write` scope required for this route.
  </Accordion>

  <Accordion title="404 Not Found" icon="ghost">
    The rule ID does not exist in your workspace.
  </Accordion>

  <Accordion title="500 Internal Server Error" icon="triangle-exclamation">
    Fini failed while creating the duplicate in storage.
  </Accordion>
</AccordionGroup>
