logs

Create a notification destination for this alert. One HogFunction is created per alert event kind (firing, resolved, ...) atomically. A PagerDuty destination gets the incident opened and incident closed kinds instead. They follow every start and end of a firing, cooldown included, so each incident it opens is resolved.

post/api/projects/{project_id}/logs/alerts/{id}/destinations/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/logs/alerts/{id}/destinations/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this logs alert configuration.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

type'slack' | 'webhook' | 'teams' | 'pagerduty' required
  • slack - slack
  • webhook - webhook
  • teams - teams
  • pagerduty - pagerduty
slack_workspace_idinteger

Integration ID for the Slack workspace. Required when type=slack.

slack_channel_idstring

Slack channel ID. Required when type=slack.

slack_channel_namestring

Human-readable channel name for display.

webhook_urlstring uri

HTTPS endpoint to post to. Required for webhook and teams.

pagerduty_routing_keystring

Integration key of a PagerDuty Events API v2 integration. Required when type=pagerduty.

pagerduty_severity'critical' | 'error' | 'warning' | 'info'
  • critical - critical
  • error - error
  • warning - warning
  • info - info
pagerduty_region'us' | 'eu'
  • us - us
  • eu - eu

Response

hog_function_idsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.