[HTTP POST] ~/webhook/subscribe/{eventName}
Description: Creates a webhook subscription for a given event name.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| eventName | string |
Required |
Body Parameters
WebhookSubscriptionDTO
| Name | Description | Type | Additional information |
|---|---|---|---|
| JourneyId | integer |
Required |
|
| EmailId | integer |
None. |
|
| TextMessageId | integer |
None. |
|
| LandingPageId | integer |
None. |
|
| EDocumentId | integer |
None. |
|
| WebhookUrl | string |
Required |
|
| WebhookName | string |
Required |
|
| WebHookDescription | string |
Required |
Formats
application/json, text/json
Sample:
{
"JourneyId": 1,
"EmailId": 1,
"TextMessageId": 1,
"LandingPageId": 1,
"EDocumentId": 1,
"WebhookUrl": "sample string 1",
"WebhookName": "sample string 2",
"WebHookDescription": "sample string 3"
}
application/csp-report
Sample:
{"JourneyId":1,"EmailId":1,"TextMessageId":1,"LandingPageId":1,"EDocumentId":1,"WebhookUrl":"sample string 1","WebhookName":"sample string 2","WebHookDescription":"sample string 3"}
application/xml, text/xml
Sample:
<WebhookSubscriptionDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO"> <EDocumentId>1</EDocumentId> <EmailId>1</EmailId> <JourneyId>1</JourneyId> <LandingPageId>1</LandingPageId> <TextMessageId>1</TextMessageId> <WebHookDescription>sample string 3</WebHookDescription> <WebhookName>sample string 2</WebhookName> <WebhookUrl>sample string 1</WebhookUrl> </WebhookSubscriptionDTO>
Response Information
Description
Successful Response - OK (200):
Response Content : HttpResponseMessage
| Name | Description | Type | Additional information |
|---|---|---|---|
| Version | Version |
None. |
|
| Content | HttpContent |
None. |
|
| StatusCode | HttpStatusCode |
None. |
|
| ReasonPhrase | string |
None. |
|
| Headers | Collection of Object |
None. |
|
| RequestMessage | HttpRequestMessage |
None. |
|
| IsSuccessStatusCode | boolean |
None. |
Response Codes:
-
200 - OK
-
201 - Created
- The Subscription was successfully created
-
400 - BadRequest
-
401 - Unauthorized