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

# Create tag group

> Create a custom tag group.

Creates a custom tag group and returns the stored [`TagGroup`](/en/api-reference/tag-groups#taggroup-object).

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

## Body parameters

<ParamField body="title" type="string" required>
  Group title.
</ParamField>

<ParamField body="description" type="string">
  Optional group description.
</ParamField>

<ParamField body="prompt" type="string">
  Optional AI-instruction text for the group's tag selection logic.
</ParamField>

<ParamField body="multiselect" type="boolean">
  Optional flag controlling whether the group allows multiple tags per conversation.
</ParamField>

<ParamField body="isOutputTagGroup" type="boolean">
  Optional flag for output-only groups. If `true`, this group will not be available in Rulebooks, including intent-based rules, so leave it `false` for routing or other Rulebook conditions.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api-prod.usefini.com/v2/tag-groups/public' \
    --header 'Authorization: Bearer fini_your_api_key' \
    --header 'Content-Type: application/json' \
    --data '{
      "title": "Resolution Outcome",
      "description": "Post-reply outcome tags for downstream workflows.",
      "prompt": "Apply the tag that best describes how the assistant handled the conversation.",
      "multiselect": false,
      "isOutputTagGroup": true
    }'
  ```

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

  response = requests.post(
      "https://api-prod.usefini.com/v2/tag-groups/public",
      headers={
          "Authorization": "Bearer fini_your_api_key",
          "Content-Type": "application/json",
      },
      json={
          "title": "Resolution Outcome",
          "description": "Post-reply outcome tags for downstream workflows.",
          "prompt": "Apply the tag that best describes how the assistant handled the conversation.",
          "multiselect": False,
          "isOutputTagGroup": True,
      },
  )
  tag_group = response.json()
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api-prod.usefini.com/v2/tag-groups/public",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer fini_your_api_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        title: "Resolution Outcome",
        description: "Post-reply outcome tags for downstream workflows.",
        prompt:
          "Apply the tag that best describes how the assistant handled the conversation.",
        multiselect: false,
        isOutputTagGroup: true,
      }),
    }
  );
  const tagGroup = await response.json();
  ```
</RequestExample>

## Response

Returns the created [`TagGroup`](/en/api-reference/tag-groups#taggroup-object).

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "f770d0bb-d5ea-44e7-a92a-fcfa2d5a32d5",
    "createdAt": "2026-06-19T07:30:11.000Z",
    "companyId": "38ba4db0-31db-4669-bb95-7b8313c4016b",
    "title": "Resolution Outcome",
    "description": "Post-reply outcome tags for downstream workflows.",
    "prompt": "Apply the tag that best describes how the assistant handled the conversation.",
    "multiselect": false,
    "updatedAt": "2026-06-19T07:30:11.000Z",
    "mandatory": false,
    "isOutputTagGroup": true
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "statusCode": 400,
    "message": [
      "title should not be empty"
    ],
    "error": "Bad Request"
  }
  ```
</ResponseExample>

## Errors

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    The body is malformed or missing the required `title`.
  </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="500 Internal Server Error" icon="triangle-exclamation">
    Fini failed while creating the tag group in storage.
  </Accordion>
</AccordionGroup>
