> ## Documentation Index
> Fetch the complete documentation index at: https://datum-4926dda5-docs-api-reference-demo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ContactGroup

> ContactGroup is the Schema for the contactgroups API. It represents a logical grouping of Contacts.

<Note>
  API resource reference for **ContactGroup**, part of the [Notification service](/api/notification/overview). To create or change one, see [Changing resources](/datumctl/resources/changing); to inspect, see [Reading resources](/datumctl/resources/reading).
</Note>

<Warning>
  This resource is part of the `v1alpha1` API and is subject to change. Fields and behavior may change in future releases.
</Warning>

## Identity

|         |                             |
| ------- | --------------------------- |
| Group   | `notification.miloapis.com` |
| Version | `v1alpha1`                  |
| Kind    | `ContactGroup`              |
| Scope   | Project                     |

## Overview

A `ContactGroup` represents a logical grouping of Contacts within a Project. Use it to organize the people who should receive notifications, and to control how members join or leave the group. A group can optionally be synced to an external email provider (such as Loops) so the same audience is available there.

Visibility governs opt-out behavior: a `public` group lets members leave on their own (via a `ContactGroupMembershipRemoval`), while a `private` group enforces membership and rejects opt-out requests.

## Spec fields

| Field                   | Type      | Required | Description                                                                                                                                                                                                                                           |
| ----------------------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `spec.displayName`      | string    | Yes      | The display name of the contact group.                                                                                                                                                                                                                |
| `spec.visibility`       | string    | Yes      | Whether members may opt in or out. One of `public` (members may leave via `ContactGroupMembershipRemoval`) or `private` (membership is enforced; opt-out requests are rejected).                                                                      |
| `spec.description`      | string    | No       | Description of the contact group. Email providers (e.g. Loops) also use this on their generated opt-in/opt-out page. Synchronization of this field is not supported.                                                                                  |
| `spec.providers`        | \[]Object | No       | The external providers this group should be synced to.                                                                                                                                                                                                |
| `spec.providers[].name` | string    | Yes      | The provider handling this contact group. Allowed value: `Loops`.                                                                                                                                                                                     |
| `spec.providers[].id`   | string    | Yes      | The identifier of the contact group in the external provider. Used when a provider does not expose an API for creating mailing lists and requires an existing list ID (e.g. Loops); if omitted, a new group is created when the provider supports it. |

## Status fields (read-only)

| Field               | Type      | Description                                                                                                                                                                           |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status.conditions` | \[]Object | Latest observations of the group's state. The standard `Ready` condition tracks group creation and sync to the provider.                                                              |
| `status.providers`  | \[]Object | Per-provider status, enabling tracking of multiple provider backends simultaneously. Each entry has `name` (`Resend` or `Loops`) and `id` (the identifier returned by that provider). |
| `status.providerID` | string    | Identifier returned by the underlying provider when the group is created. Deprecated: use `status.providers` instead.                                                                 |

## Usage

```yaml theme={null}
apiVersion: notification.miloapis.com/v1alpha1
kind: ContactGroup
metadata:
  name: platform-alerts
spec:
  displayName: Platform Alerts
  visibility: public
  description: Recipients for platform status and incident notifications.
```

```bash theme={null}
datumctl apply -f contactgroup.yaml --project my-project
datumctl get contactgroups --project my-project
datumctl describe contactgroup platform-alerts --project my-project
```

<Tip>
  Run `datumctl explain contactgroups --recursive` to see the full, live field tree for this resource.
</Tip>
