younifyd
Menu

Update Webhook

Update a Webhook

PATCH/hubs/{hubId}/webhooks/{webhookId}

Use it in a workflow

  1. Add a step and choose the Amplience connector.
  2. Pick the Update Webhook action (under Webhooks).
  3. Fill in the fields below, then reference the result from later steps as {{updateWebhook.response.data}}.

Request

Path parameters

hubIdstringrequired

Hub ID

webhookIdstringrequired

Webhook ID

Request body

Enter the body as JSON in the step's Body field.

idstring

ID

labelstring

Label for the Webhook

eventsarray<string>

List of events to register the Webhook against

handlersarray<string>

List of URLs to receive the Webhook

activeboolean

Indicates if the Webhook should be fired

notificationsarray<object>

List of notifications

emailstring

email address to notify

secretstring

Shared secret between the handler and DC

createdDatestring (date-time)

Created Date

lastModifiedDatestring (date-time)

Last Modified Date

headersarray<object>

List of additional headers

keystringrequired

header key

valuestring

header value

secretboolean

Indicates thats this header value is sensitive

filtersarray<object>
typestringrequired

Type of filter

methodstring

Webhook HTTP method

One ofPOSTPUTPATCHDELETE

customPayloadobject

Custom Payload

typestringrequired

Type of Custom Payload

One oftext/x-handlebars-template

valuestringrequired
errorobject1 fields
_linksobject

Resource HAL links

selfany
hubany
requestsany
event-typesany
updateany
deleteany
json
{
  "id": "00112233445566778899aabb",
  "label": "Snapshot Updated Webhook",
  "events": [
    "dynamic-content.snapshot.published"
  ],
  "handlers": [
    "http://example.com/webhook"
  ],
  "active": true,
  "notifications": [
    {
      "email": "test@example.com"
    }
  ],
  "secret": "my-subscription-secret",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "headers": [
    {
      "key": "X-Additional-Header",
      "value": "abc123",
      "secret": true
    }
  ],
  "filters": [
    {
      "type": "equal",
      "arguments": [
        {
          "jsonPath": "$.payload.id"
        },
        {
          "value": "abc"
        }
      ]
    },
    {
      "type": "in",
      "arguments": [
        {
          "jsonPath": "$.payload.id"
        },
        {
          "value": [
            "abc",
            "def"
          ]
        }
      ]
    },
    {
      "type": "equal",
      "arguments": [
        {
          "jsonPath": "$.payload.not_present"
        },
        {
          "value": "123"
        }
      ]
    }
  ],
  "method": "POST"
}

Response

Returns 200 with an object. Read it in later steps with {{updateWebhook.response.data.<field>}}.

idstring

ID

labelstring

Label for the Webhook

eventsarray<string>

List of events to register the Webhook against

handlersarray<string>

List of URLs to receive the Webhook

activeboolean

Indicates if the Webhook should be fired

notificationsarray<object>

List of notifications

emailstring

email address to notify

secretstring

Shared secret between the handler and DC

createdDatestring (date-time)

Created Date

lastModifiedDatestring (date-time)

Last Modified Date

headersarray<object>

List of additional headers

keystringrequired

header key

valuestring

header value

secretboolean

Indicates thats this header value is sensitive

filtersarray<object>
typestringrequired

Type of filter

methodstring

Webhook HTTP method

One ofPOSTPUTPATCHDELETE

customPayloadobject

Custom Payload

typestringrequired

Type of Custom Payload

One oftext/x-handlebars-template

valuestringrequired
errorobject1 fields
_linksobject

Resource HAL links

selfany
hubany
requestsany
event-typesany
updateany
deleteany
json
{
  "id": "00112233445566778899aabb",
  "label": "Snapshot Updated Webhook",
  "events": [
    "dynamic-content.snapshot.published"
  ],
  "handlers": [
    "http://example.com/webhook"
  ],
  "active": true,
  "notifications": [
    {
      "email": "test@example.com"
    }
  ],
  "secret": "my-subscription-secret",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "headers": [
    {
      "key": "X-Additional-Header",
      "value": "abc123",
      "secret": true
    }
  ],
  "filters": [
    {
      "type": "equal",
      "arguments": [
        {
          "jsonPath": "$.payload.id"
        },
        {
          "value": "abc"
        }
      ]
    },
    {
      "type": "in",
      "arguments": [
        {
          "jsonPath": "$.payload.id"
        },
        {
          "value": [
            "abc",
            "def"
          ]
        }
      ]
    },
    {
      "type": "equal",
      "arguments": [
        {
          "jsonPath": "$.payload.not_present"
        },
        {
          "value": "123"
        }
      ]
    }
  ],
  "method": "POST"
}

Need more? See the Amplience guide for connection setup and behaviour shared by every action.