POST
/
v2
/
notifications
/
create
Create an offset lifecycle event notification configuration
curl --request POST \
  --url https://api.metronome.com/v2/notifications/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "+1 day after contract starts",
  "policy": {
    "type": "contract.start",
    "offset": "P1D"
  },
  "uniqueness_key": "contract-start-notification-823j7fqzo1"
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
    "name": "+1 day after contract starts",
    "type": "OFFSET_LIFECYCLE_EVENT",
    "policy": {
      "type": "contract.start",
      "offset": "P1D"
    },
    "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

Notification configuration details

name
string
required

The name for this offset notification configuration.

policy
object
required

The offset lifecycle event policy that defines when and how this notification should be triggered. The lifecycle event type is inferred from the policy.type field.

uniqueness_key
string

Optional uniqueness key to prevent duplicate notification configurations.

Required string length: 1 - 128

Response

Success

data
object
required