---
title: "ezgh obs contact-points apply"
description: "Create or update a contact point from a JSON file."
---

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

# ezgh obs contact-points apply

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh obs contact-points apply -f <file.json> [--webhook-secret-env NAME] [--slack-url-env NAME] [flags]
```

Make a contact point match a JSON file: &#123; "name", "type", and "email", "webhook" or "slack" &#125;, as `get -o json` prints it (the fields obs-api adds are ignored). The contact point is the one the file's id or slug names (it must exist), else the one named name, if exactly one is. When there's none, apply creates it. An update is sent with the ETag ezgh just read, and replaces the fields the file has.

A webhook's secret and header values and a Slack URL are write-only: an update that leaves them out keeps the stored ones, so a file in Git never has to carry them. `--webhook-secret-env` and `--slack-url-env` read them from an environment variable instead of the file. A webhook created without a secret gets one from obs-api, printed once on stderr: store it then, because it can't be shown again. Receivers check it in X-EZGH-Signature.

Each email address must confirm once per project, from a confirmation email, before it receives alerts; apply says how many are waiting. Saving the contact point again re-sends the email (at most once an hour).

Part of [`ezgh obs contact-points`](/cli/reference/obs-contact-points).

## Examples

```sh
ezgh obs contact-points apply -f contact-points/payments.json
OPS_HOOK_SECRET=… ezgh obs contact-points apply -f ops-hook.json --webhook-secret-env OPS_HOOK_SECRET
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `-f`, `--file` | string |  | the contact point's JSON file, or - for stdin |
| `--slack-url-env` | string |  | set the Slack incoming-webhook URL from this environment variable |
| `--webhook-secret-env` | string |  | set the webhook's signing secret from this environment variable |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/obs-contact-points-apply/index.mdx
