Webhooks
Base URL: https://api.amplience.net/v2/content
Authorization and status codes
For authorization and status codes see the API Reference overview.
WebhooksLink copied!
| Method | Endpoint | Summary |
|---|---|---|
GET | /hubs/{hubId}/webhooks | List webhooks for a hub |
POST | /hubs/{hubId}/webhooks | Create webhooks |
GET | /hubs/{hubId}/webhooks/{webhookId} | Get a webhook |
PATCH | /hubs/{hubId}/webhooks/{webhookId} | Update a webhook |
DELETE | /hubs/{hubId}/webhooks/{webhookId} | Delete a webhook |
GET | /hubs/{hubId}/webhooks/{webhookId}/requests | List requests for a webhook |
GET | /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId} | Get a webhook request |
POST | /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview | Preview webhook request |
POST | /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend | Resend a webhook request |
List webhooks for a hubLink copied!
GET /hubs/{hubId}/webhooks
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks
List all of the Webhooks created for a hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
page | query | integer | Page number Example: 0 | |
size | query | integer | Page size Example: 20 | |
sort | query | string | Sort paramter Example: createdDate,asc |
Responses
| Status | Description |
|---|---|
| 200 | Paginated Webhook List |
Response Example (200)
Create webhooksLink copied!
POST /hubs/{hubId}/webhooks
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks
Create a new Webhook for a Hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID 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 |
Request example
Responses
| Status | Description |
|---|---|
| 201 | Created Webhook |
Response Example (201)
Get a webhookLink copied!
GET /hubs/{hubId}/webhooks/{webhookId}
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}
Get a specified webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request List |
Response Example (200)
Update a webhookLink copied!
PATCH /hubs/{hubId}/webhooks/{webhookId}
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}
Update a specified webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID 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 |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request List |
Response Example (200)
Delete a webhookLink copied!
DELETE /hubs/{hubId}/webhooks/{webhookId}
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}
Delete a specified webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 204 | No content |
List requests for a webhookLink copied!
GET /hubs/{hubId}/webhooks/{webhookId}/requests
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests
List all of the requests created for a webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request List |
Response Example (200)
Get a webhook requestLink copied!
GET /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}
Get a single webhook request
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
requestId | path | string | ✓ | Webhook Request ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request Response |
Response Example (200)
Preview webhook requestLink copied!
POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview
You can test your unsaved Webhook Subscription against an already sent Webhook Request
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
requestId | path | string | ✓ | Webhook Request ID 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 |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request Response |
Response Example (200)
Resend a webhook requestLink copied!
POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend
https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend
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 Example: 00112233445566778899aabb |
webhookId | path | string | ✓ | Webhook ID Example: 00112233445566778899aabb |
requestId | path | string | ✓ | Webhook Request ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
Responses
| Status | Description |
|---|---|
| 200 | Webhook Request Response |