POST
/
v2
/
notifications
/
edit
Edit an offset lifecycle event notification configuration
curl --request POST \
  --url https://api.metronome.com/v2/notifications/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "policy": {
    "type": "contract.start",
    "offset": "P2D"
  }
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
    "name": "+1 day after contract starts",
    "type": "OFFSET_LIFECYCLE_EVENT",
    "policy": {
      "type": "contract.start",
      "offset": "P2D"
    },
    "environment_type": "PRODUCTION",
    "created_at": "2024-01-15T10:30:00Z",
    "created_by": "Martins Seyi"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Offset notification configuration updates

policy
object
required

Updated policy configuration. The policy.type must match the existing lifecycle event type.

id
string<uuid>

The ID of the notification configuration to edit. Not provided when updating the configuration for system events

is_enabled
boolean

Set to true to enable webhook messages for the notification indicated in the policy, false to disable. Only supported by system lifecycle events.

Response

Success

data
object
required