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

# Update Credential Group

### Description

This endpoint allows you to update an existing **credential group** in Hyperstack. The group key is passed as a URL path parameter. Only the fields provided in the request body will be updated.

### Headers

<ParamField header="Authorization" type="string" required="true">
  Bearer YOUR\_API\_TOKEN — obtainable from **Hyperstack Dashboard → Settings → API Access**
</ParamField>

### Path Parameters

<ParamField path="group_key" type="string" required="true">
  Unique key of the credential group to update.
</ParamField>

### Body Parameters

<ParamField body="title" type="string" required="false">
  Updated title of the credential group.
</ParamField>

<ParamField body="description" type="string" required="false">
  Updated description of the credential group.
</ParamField>

<ParamField body="certificate_template" type="string" required="false">
  New certificate template key.
</ParamField>

<ParamField body="badge_template" type="string" required="false">
  New badge template key.
</ParamField>

<ParamField body="url" type="string" required="false">
  Updated external URL associated with the credential group.
</ParamField>

<ParamField body="tags" type="array[string]" required="false">
  Updated tags for the credential group.
</ParamField>

<ParamField body="group_code" type="string" required="false">
  Updated human-readable code for the group. Alphanumeric, hyphens, and spaces only.
</ParamField>

<ParamField body="does_expire" type="boolean" required="false">
  Indicates whether credentials in this group expire.
</ParamField>

<ParamField body="validity" type="number" required="conditional">
  Validity period (in years) if <code>does\_expire</code> is `true`.
</ParamField>

<ParamField body="blockchain" type="boolean" required="false">
  Enable/disable decentralized blockchain anchoring for credentials.
</ParamField>

### Success Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the group update was successful. Always `true` for a 200 response.
</ResponseField>

### Responses

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "error": "Invalid Badge Template",
    "error_code": "invalid_badge_template"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "success": false,
    "error": "Group Not Found",
    "error_code": "not_found"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "Invalid token or organization not found"
  }
  ```
</ResponseExample>

***

```bash theme={null}
curl -X POST "https://api.thehyperstack.com/v1/group/update/unique_group_id_12345" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Course Certificate",
    "description": "Updated course description",
    "tags": ["updated", "certificate"],
    "does_expire": true,
    "validity": 2
  }'
```
