> ## Documentation Index
> Fetch the complete documentation index at: https://cobalt-55-abhishek.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Dataref Group

> Bulk set or clear the group on multiple datarefs.

Set or clear the `group` label on multiple datarefs at once. Passing an empty `group` unsets the field. Groups help organize related datarefs.

## Authentication

<ParamField header="x-api-key" type="string" required>Your Refold API key.</ParamField>
<ParamField header="linked_account_id" type="string" required>The linked account that owns the datarefs.</ParamField>

## Body Parameters

<ParamField body="refNames" type="array" required>
  Names of the datarefs to update.
</ParamField>

<ParamField body="group" type="string">
  Group label to set. An empty string unsets the group.
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    Returns `200` with an empty body on success.
  </Tab>

  <Tab title="400 Bad Request">
    <ResponseField name="status_code" type="integer">HTTP status code.</ResponseField>
    <ResponseField name="http_error_type" type="string">Error category.</ResponseField>
    <ResponseField name="error" type="string">Internal error code.</ResponseField>
    <ResponseField name="message" type="string">Human-readable error description.</ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 theme={null}
  ```

  ```json 400 theme={null}
  {
    "status_code": 400,
    "http_error_type": "BAD_REQUEST",
    "error": "SERVER_ERROR",
    "message": "refNames is required"
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL (set group) theme={null}
  curl -X PUT "https://app.refold.ai/api/v2/public/datarefs/group" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
    -H "Content-Type: application/json" \
    -d '{ "refNames": ["contacts", "deals"], "group": "crm-data" }'
  ```

  ```bash cURL (clear group) theme={null}
  curl -X PUT "https://app.refold.ai/api/v2/public/datarefs/group" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
    -H "Content-Type: application/json" \
    -d '{ "refNames": ["contacts"], "group": "" }'
  ```
</RequestExample>
