Channels

Update a notification channel

Partially updates a channel's name and/or config in place, preserving its id and all route assignments. This lets IaC clients (e.g. a Terraform provider) edit a destination without destroying and recreating it, which would otherwise discard email-verification state and cascade into routes.

kind is immutable — attempting to change it returns 400.

Changing an email channel's address resets verified to false and sends a fresh verification email; any other change preserves verification.

patch/api/v1/channels/{id}

Request

  • Base URL: https://app.lastping.dev
  • URL: https://app.lastping.dev/api/v1/channels/{id}
  • Auth: API key in header X-Api-Key

Request body

kindstring

Present only to be rejected — kind is immutable.

namestring

New human-readable label for the channel.

configobject

Replacement kind-specific configuration object (see description above). A secret field left out keeps its stored value while the webhook url / ntfy topic_url is unchanged; "" clears an optional one.

Example request

{
  "kind": "webhook",
  "name": "Ops webhook (renamed)",
  "config": {
    "url": "https://example.com/hook",
    "secret": "new-s3cr3t"
  }
}

Response

The updated channel (no secrets).

idstring uuid

Unique channel identifier.

kind'webhook' | 'telegram' | 'discord' | 'slack' | 'ntfy' | 'pushover' | 'msteams' | 'googlechat' | 'email'

Channel type.

namestring

Human-readable label.

targetstring

Non-secret hint about the channel destination.

  • webhook: the webhook URL.
  • telegram: "chat <chat_id>".
  • discord: the fixed string "discord webhook" (the actual URL is write-only).
  • slack: the fixed string "slack webhook" (the actual URL is write-only).
  • ntfy: the topic URL (not a credential, so it is returned in full).
  • pushover: the fixed string "pushover" (token and user_key are write-only).
  • msteams: the fixed string "teams webhook" (the actual URL is write-only).
  • googlechat: the fixed string "google chat webhook" (the actual URL is write-only).
  • email: the email address.
verifiedboolean

Whether the channel has been verified. Always true for webhook, telegram, discord, slack, ntfy, pushover, msteams, and googlechat channels (verified on creation). For email channels, false until the recipient clicks the verification link; unverified email channels do not send alerts.

disabledboolean

Whether the channel has been disabled (e.g. after repeated delivery failures).

disable_reasonstring

Human-readable reason the channel was disabled (omitted when not disabled).

created_atstring date-time

RFC 3339 UTC timestamp when the channel was created.

used_by_monitorsinteger

How many distinct monitors route any event to this destination. Counted across every event type, so a monitor routing both down and recovery here counts once. 0 means nothing would ever be sent to it.

Omitted when the server could not read the count. That happens on one path only: PATCH /api/v1/channels/{id} commits the update before it reads the count, so a read failure there leaves the destination saved and this field absent rather than reporting a 0 the destination has not earned. Re-read it from GET /api/v1/channels.

Example response

{
  "id": "c1d2e3f4-0000-0000-0000-000000000001",
  "kind": "webhook",
  "name": "Ops webhook",
  "target": "https://example.com/hook",
  "verified": true,
  "disable_reason": "too many delivery failures",
  "created_at": "2026-07-01T12:00:00Z",
  "used_by_monitors": 7
}

Changes

No recorded changes to this operation across all 2 revisions of this API.