---
canonical: https://amplience.com/developers/docs/apis/content-management-reference/webhooks/
title: "Webhooks"
description: "API reference for webhook endpoints. Covers webhook configuration, request history, and resending."
audience: Developer
date_published: 2023-08-29
date_modified: 2026-07-05
---

# Webhooks

**Base URL:** `https://api.amplience.net/v2/content`

> **Note: Authorization and status codes**
> For authorization and status codes see the [API Reference overview](https://amplience.com/developers/docs/apis/content-management-reference/).

## Webhooks

| Method | Endpoint | Summary |
|--------|----------|---------|
| `GET` | `/hubs/{hubId}/webhooks` | [List webhooks for a hub](#list-webhooks-for-a-hub) |
| `POST` | `/hubs/{hubId}/webhooks` | [Create webhooks](#create-webhooks) |
| `GET` | `/hubs/{hubId}/webhooks/{webhookId}` | [Get a webhook](#get-a-webhook) |
| `PATCH` | `/hubs/{hubId}/webhooks/{webhookId}` | [Update a webhook](#update-a-webhook) |
| `DELETE` | `/hubs/{hubId}/webhooks/{webhookId}` | [Delete a webhook](#delete-a-webhook) |
| `GET` | `/hubs/{hubId}/webhooks/{webhookId}/requests` | [List requests for a webhook](#list-requests-for-a-webhook) |
| `GET` | `/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}` | [Get a webhook request](#get-a-webhook-request) |
| `POST` | `/hubs/{hubId}`<br/>`/webhooks/{webhookId}/requests/{requestId}/preview` | [Preview webhook request](#preview-webhook-request) |
| `POST` | `/hubs/{hubId}`<br/>`/webhooks/{webhookId}/requests/{requestId}/resend` | [Resend a webhook request](#resend-a-webhook-request) |

### List webhooks for a hub

`GET /hubs/{hubId}/webhooks`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks`</small>

List all of the Webhooks created for a hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `page` | query | integer |  | Page number<br/>Example: `0` |
| `size` | query | integer |  | Page size<br/>Example: `20` |
| `sort` | query | string |  | Sort paramter<br/>Example: `createdDate,asc` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Paginated Webhook List |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "webhooks": [
      {
        "id": "00112233445566778899aabb",
        "label": "Snapshot Updated Webhook",
        "events": [
          "dynamic-content.snapshot.published"
        ],
        "handlers": [],
        "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": [],
        "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",
        "customPayload": {
          "type": "text/x-handlebars-template",
          "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
        },
        "_links": {
          "self": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
          },
          "hub": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
          },
          "requests": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
            "templated": true
          },
          "event-types": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
          },
          "update": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
          },
          "delete": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=0&size=20"
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=0&size=20"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=1&size=20"
    },
    "last": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=2&size=20"
    },
    "event-types": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/event-types"
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Create webhooks

`POST /hubs/{hubId}/webhooks`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks`</small>

Create a new Webhook for a Hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | string | ✓ | Label for the Webhook |
| `events` | array | ✓ | List of events to register the Webhook against |
| `handlers` | array | ✓ | List of URLs to receive the Webhook |
| `active` | boolean | ✓ | Indicates if the Webhook should be fired |
| `notifications` | array |  | List of notifications |
| `secret` | string | ✓ | Shared secret between the handler and DC |
| `headers` | array |  | List of additional headers. Each header object has `key`, `value`, and an optional `secret` boolean. When `secret: true`, the `value` is masked and returned as `null` in all subsequent API responses. Store the value securely at creation time. |
| `filters` | array |  |  |
| `method` | string (POST, PUT, PATCH, DELETE) | ✓ | Webhook HTTP method |
| `customPayload` | object |  | Custom Payload |

<details>
<summary>Request example</summary>

```json
{
  "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",
  "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",
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  }
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 201 | Created Webhook |

<details>
<summary>Response Example (201)</summary>

```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": null,
      "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",
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "requests": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
      "templated": true
    },
    "event-types": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get a webhook

`GET /hubs/{hubId}/webhooks/{webhookId}`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}`</small>

Get a specified webhook

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request List |

<details>
<summary>Response Example (200)</summary>

```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": null,
      "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",
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "requests": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
      "templated": true
    },
    "event-types": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    }
  }
}
```

</details>

### Update a webhook

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

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}`</small>

Update a specified webhook

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | string |  | Label for the Webhook |
| `events` | array |  | List of events to register the Webhook against |
| `handlers` | array |  | List of URLs to receive the Webhook |
| `active` | boolean |  | Indicates if the Webhook should be fired |
| `notifications` | array |  | List of notifications |
| `secret` | string |  | Shared secret between the handler and DC |
| `headers` | array |  | List of additional headers |
| `filters` | array |  |  |
| `method` | string (POST, PUT, PATCH, DELETE) |  | Webhook HTTP method |
| `customPayload` | object |  | Custom Payload |

<details>
<summary>Request example</summary>

```json
{
  "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",
  "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",
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  }
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request List |

<details>
<summary>Response Example (200)</summary>

```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": null,
      "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",
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "requests": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
      "templated": true
    },
    "event-types": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
    }
  }
}
```

</details>

### Delete a webhook

`DELETE /hubs/{hubId}/webhooks/{webhookId}`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}`</small>

Delete a specified webhook

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 204 | No content |

### List requests for a webhook

`GET /hubs/{hubId}/webhooks/{webhookId}/requests`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests`</small>

List all of the requests created for a webhook

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request List |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "requests": [
      {
        "id": "00112233445566778899aabb",
        "eventId": "00112233445566778899aabb",
        "eventName": [
          "dynamic-content.snapshot.published"
        ],
        "requestState": "SUCCESS",
        "attempts": 1,
        "request": {
          "customHeaders": []
        },
        "invocations": [],
        "evaluatedFilters": {
          "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"
                }
              ]
            }
          ],
          "results": [
            {
              "status": "UNMATCHED"
            },
            {
              "status": "MATCHED",
              "index": 1
            },
            {
              "status": "IGNORED"
            }
          ]
        },
        "customPayload": {
          "type": "text/x-handlebars-template",
          "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
        },
        "createdTimestamp": "2019-01-01T00:00:00.000Z",
        "scheduledTimestamp": "2019-01-01T00:00:00.000Z",
        "_links": {
          "self": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
          },
          "request": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
            "templated": true
          },
          "resend": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
          },
          "preview": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests?limit=20"
    },
    "request": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit,excludeStatus}",
      "templated": true
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests?cursor=CURSOR&limit=20"
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Get a webhook request

`GET /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}`</small>

Get a single webhook request

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |
| `requestId` | path | string | ✓ | Webhook Request ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "eventId": "00112233445566778899aabb",
  "eventName": [
    "dynamic-content.snapshot.published"
  ],
  "requestState": "SUCCESS",
  "attempts": 1,
  "request": {
    "customHeaders": [
      {
        "key": "X-Custom-Header",
        "value": "123",
        "secret": false
      }
    ]
  },
  "invocations": [
    {
      "invocationTimestamp": "2019-01-01T00:00:00.000Z",
      "request": {
        "url": "http://example.com",
        "headers": {
          "X-Amplience-Hmac-Sha256": "1VVTWEZPxOGIkTL9b5V6rEjiiP46N2yHg/pYpLmcaKA=",
          "User-Agent": "Amplience-Webhook/0.1",
          "Content-Length": 171,
          "Content-Type": "application/json"
        },
        "body": "{\"sequenceId\":1,\"eventId\":\"8e5b697d-7c32-4e30-8ddd-2601808131d9\",\"eventName\":\"dynamic-content.edition.scheduled\",\"system\":\"dynamic-content\",\"resource\":\"0001\",\"payload\":{}}",
        "response": {
          "statusCode": 200,
          "headers": [
            "Connection: close",
            "Server: gunicorn/19.8.1",
            "Date: Tue, 15 May 2018 12:07:13 GMT",
            "Content-Type: application/json",
            "Content-Length: 3",
            "Access-Control-Allow-Origin: *",
            "Access-Control-Allow-Credentials: true",
            "Via: 1.1 vegur"
          ],
          "body": "..."
        }
      }
    }
  ],
  "evaluatedFilters": {
    "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"
          }
        ]
      }
    ],
    "results": [
      {
        "status": "UNMATCHED"
      },
      {
        "status": "MATCHED",
        "index": 1
      },
      {
        "status": "IGNORED"
      }
    ]
  },
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "createdTimestamp": "2019-01-01T00:00:00.000Z",
  "scheduledTimestamp": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
    },
    "request": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
      "templated": true
    },
    "resend": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
    },
    "preview": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
    }
  }
}
```

</details>

### Preview webhook request

`POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview`</small>

You can test your unsaved Webhook Subscription against an already sent Webhook Request 

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |
| `requestId` | path | string | ✓ | Webhook Request ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | ✓ | Webhook handler URL |
| `method` | string (POST, PUT, PATCH, DELETE) | ✓ | Webhook HTTP method |
| `secret` | string | ✓ | Shared secret between the handler and DC |
| `filters` | array |  |  |
| `headers` | array |  | List of additional headers |
| `customPayload` | object |  | Custom Payload |

<details>
<summary>Request example</summary>

```json
{
  "url": "http://example.com/webhook",
  "method": "POST",
  "secret": "my-subscription-secret",
  "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"
        }
      ]
    }
  ],
  "headers": [
    {
      "key": "X-Additional-Header",
      "value": "abc123",
      "secret": true
    }
  ],
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  }
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "previewState": "SUCCESS",
  "request": {
    "customHeaders": [
      {
        "key": "X-Custom-Header",
        "value": "123",
        "secret": false
      }
    ]
  },
  "evaluatedFilters": {
    "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"
          }
        ]
      }
    ],
    "results": [
      {
        "status": "UNMATCHED"
      },
      {
        "status": "MATCHED",
        "index": 1
      },
      {
        "status": "IGNORED"
      }
    ]
  },
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "_links": {
    "request": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
    }
  }
}
```

</details>

### Resend a webhook request

`POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend`</small>

Only available for Webhook Requests that have a `requestState` that is either "SUCCESS", "FAILED" or "PROCESSING_FAILED"

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `webhookId` | path | string | ✓ | Webhook ID<br/>Example: `00112233445566778899aabb` |
| `requestId` | path | string | ✓ | Webhook Request ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Webhook Request Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "eventId": "00112233445566778899aabb",
  "eventName": [
    "dynamic-content.snapshot.published"
  ],
  "requestState": "SUCCESS",
  "attempts": 1,
  "request": {
    "customHeaders": [
      {
        "key": "X-Custom-Header",
        "value": "123",
        "secret": false
      }
    ]
  },
  "invocations": [
    {
      "invocationTimestamp": "2019-01-01T00:00:00.000Z",
      "request": {
        "url": "http://example.com",
        "headers": {
          "X-Amplience-Hmac-Sha256": "1VVTWEZPxOGIkTL9b5V6rEjiiP46N2yHg/pYpLmcaKA=",
          "User-Agent": "Amplience-Webhook/0.1",
          "Content-Length": 171,
          "Content-Type": "application/json"
        },
        "body": "{\"sequenceId\":1,\"eventId\":\"8e5b697d-7c32-4e30-8ddd-2601808131d9\",\"eventName\":\"dynamic-content.edition.scheduled\",\"system\":\"dynamic-content\",\"resource\":\"0001\",\"payload\":{}}",
        "response": {
          "statusCode": 200,
          "headers": [
            "Connection: close",
            "Server: gunicorn/19.8.1",
            "Date: Tue, 15 May 2018 12:07:13 GMT",
            "Content-Type: application/json",
            "Content-Length: 3",
            "Access-Control-Allow-Origin: *",
            "Access-Control-Allow-Credentials: true",
            "Via: 1.1 vegur"
          ],
          "body": "..."
        }
      }
    }
  ],
  "evaluatedFilters": {
    "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"
          }
        ]
      }
    ],
    "results": [
      {
        "status": "UNMATCHED"
      },
      {
        "status": "MATCHED",
        "index": 1
      },
      {
        "status": "IGNORED"
      }
    ]
  },
  "customPayload": {
    "type": "text/x-handlebars-template",
    "value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
  },
  "createdTimestamp": "2019-01-01T00:00:00.000Z",
  "scheduledTimestamp": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
    },
    "request": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
      "templated": true
    },
    "resend": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
    },
    "preview": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
    }
  }
}
```

</details>
