[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 |
---|---|---|---|
CampaignId | integer |
None. |
|
EmailId | integer |
None. |
|
TextMessageId | integer |
None. |
|
LandingPageId | integer |
None. |
|
WebhookUrl | string |
None. |
|
WebhookName | string |
None. |
|
WebHookDescription | string |
None. |
Formats
application/json, text/json
Sample:
{ "CampaignId": 1, "EmailId": 1, "TextMessageId": 1, "LandingPageId": 1, "WebhookUrl": "sample string 1", "WebhookName": "sample string 2", "WebHookDescription": "sample string 3" }
application/csp-report
Sample:
{"CampaignId":1,"EmailId":1,"TextMessageId":1,"LandingPageId":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"> <CampaignId>1</CampaignId> <EmailId>1</EmailId> <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