---
title: "Set the ID of the configuration template linked to a group"
method: PUT
path: "/groups/{group_id}/configuration-template"
tags: ["groups"]
---

# Set the ID of the configuration template linked to a group

`PUT /groups/{group_id}/configuration-template`

## Request

- Base URL: `https://api.opal.dev/v1`
- URL: `https://api.opal.dev/v1/groups/{group_id}/configuration-template`
- Auth: HTTP bearer

Attaches, repoints, or detaches the configuration template linked to a
group. This endpoint only manages the link (by ID) between a group and
an existing configuration template — it does not create, modify, or
delete the template itself. To manage a template's own fields (name,
description, request configurations, visibility, etc.), use the
`/configuration-templates` endpoints.

The request body is `{"configuration_template_id": "<uuid>" | null}`:

  * A `<uuid>` value links the group to the configuration template with
    that ID. If the group was previously linked to a different
    template, the group is repointed in place.
  * `null` detaches the group from its current configuration template.
    The template is deep-copied into a new private configuration with
    the same settings so the group's current behaviour is preserved,
    and the group is repointed at the fork.

The `configuration_template_id` field is required. Sending `{}` or any
body in which the field is omitted is rejected with `400`.

The call is idempotent: if the request body matches the group's current
link, no changes are made and no audit events are emitted.

This endpoint is the preferred, Terraform-friendly surface for linking
and unlinking configuration templates on groups. The equivalent
`configuration_template_id` field on `PUT /groups` remains available
but is deprecated for this purpose.

## Path parameters

- `group_id` string, uuid, required

## Request body

- GroupConfigurationTemplate: A reference, by ID only, to the configuration template a group is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the group is not linked to a configuration template and uses its own private configuration.
  - `configuration_template_id` string, uuid, nullable, required: The ID of the configuration template that the group is linked to, or `null` if the group is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints.

## Response `200`

The ID of the configuration template now linked to the group, or `null` if the group was detached.

- GroupConfigurationTemplate: A reference, by ID only, to the configuration template a group is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the group is not linked to a configuration template and uses its own private configuration.
  - `configuration_template_id` string, uuid, nullable, required: The ID of the configuration template that the group is linked to, or `null` if the group is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints.

## Other responses

- `400`: The request body was malformed, the required `configuration_template_id` field was omitted, or the target `configuration_template_id` does not reference a configuration template.
- `403`: The caller is not authorized to update this group.
- `404`: The group was not found.

## Changes

- **2026-10-23** `4477fe5fa4e7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/opal/apis/opal-api/changes/groups/:group_id/configuration-template/put.md)

---

[API](https://skmtc.dev/opal/apis/opal-api.md) - [All operations](https://skmtc.dev/opal/apis/opal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opal/apis/opal-api/revisions/e7877ea96eab?raw)
