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

# Create Tag Groups (Batch)

> Create multiple tag groups with inline tags in a single request

## Overview

Batch creation allows you to create multiple tag groups in a single API call. Each tag group can include inline tags that are created automatically.

<Info>
  **ID Format**: All IDs use a namespaced UUIDv7 format: `tag_group_{uuidv7}`.
</Info>

## Request Body

Array of tag group objects:

<ParamField body="[].id" type="string">
  Optional client-provided ID
</ParamField>

<ParamField body="[].scopeId" type="string" required>
  ID of the scope where this tag group is defined
</ParamField>

<ParamField body="[].name" type="string" required>
  Display name for the tag group
</ParamField>

<ParamField body="[].key" type="string" required>
  Unique key for the tag group within the scope
</ParamField>

<ParamField body="[].description" type="string" required>
  Description of the tag group
</ParamField>

<ParamField body="[].origin" type="string">
  Origin of the tag group. One of: `system`, `user`. Default: `user`
</ParamField>

<ParamField body="[].maxAppliedPerTarget" type="number">
  Maximum number of tags from this group that can be applied to a single target
</ParamField>

<ParamField body="[].isLocked" type="boolean">
  Whether the tag group is locked from modifications
</ParamField>

<ParamField body="[].tags" type="array">
  Optional array of inline tags to create with the group. Each tag has:

  * `id` (optional): Client-provided ID
  * `identifier` (required): Unique identifier within the group
  * `label` (required): Display label for the tag
</ParamField>

## Response

Returns an array of created tag group objects.

<Note>
  Each tag group can include a `tags` array to create tags inline. This allows you to set up complete tag taxonomies in a single request.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://api.example.com/tag-groups/batch' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '[
      {
        "scopeId": "scope_project",
        "name": "Priority",
        "key": "priority",
        "description": "Task priority levels",
        "maxAppliedPerTarget": 1,
        "tags": [
          {"identifier": "critical", "label": "Critical"},
          {"identifier": "high", "label": "High"},
          {"identifier": "medium", "label": "Medium"},
          {"identifier": "low", "label": "Low"}
        ]
      },
      {
        "scopeId": "scope_project",
        "name": "Status",
        "key": "status",
        "description": "Task status",
        "maxAppliedPerTarget": 1,
        "tags": [
          {"identifier": "open", "label": "Open"},
          {"identifier": "in_progress", "label": "In Progress"},
          {"identifier": "review", "label": "In Review"},
          {"identifier": "done", "label": "Done"}
        ]
      },
      {
        "scopeId": "scope_project",
        "name": "Departments",
        "key": "departments",
        "description": "Organization departments",
        "tags": [
          {"identifier": "engineering", "label": "Engineering"},
          {"identifier": "sales", "label": "Sales"},
          {"identifier": "marketing", "label": "Marketing"}
        ]
      }
    ]'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "id": "tag_group_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
      "scopeId": "scope_project",
      "name": "Priority",
      "key": "priority",
      "description": "Task priority levels",
      "origin": "user",
      "maxAppliedPerTarget": 1,
      "isLocked": false,
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "tag_group_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
      "scopeId": "scope_project",
      "name": "Status",
      "key": "status",
      "description": "Task status",
      "origin": "user",
      "maxAppliedPerTarget": 1,
      "isLocked": false,
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "tag_group_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5d",
      "scopeId": "scope_project",
      "name": "Departments",
      "key": "departments",
      "description": "Organization departments",
      "origin": "user",
      "maxAppliedPerTarget": null,
      "isLocked": false,
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ]
  ```
</ResponseExample>
