Create a webhook
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/webhooks
clientIdinteger<int64>Client ID
acceptstringGenerated from available response content types
basicAuthUsernamestring<p>User name for Basic HTTP Authentication. This parameter is deprecated and might be removed in the near future. Please use <authentication> instead.</p>
basicAuthPasswordstring<p>Password for Basic HTTP Authentication. This parameter is deprecated and might be removed in the near future. Please use <authentication> instead.</p>
typestring<open | click | sent | bounce | unsubscribe | spamcomplaint | singleoptin | confirmedoptin | doubleoptin | blocklist | archive | filteredbyblocklist>Event data type
formatstring<json>Data format in which the event data is to be sent
authenticationstring<p>Authentication method and attributes as json.
Current types are:</p>
<p>or</p>
<p>or</p>
targetUrlstring<p>Target URL to which the event data is to be sentNote: The URL must be accessible and able to receive data via HTTP POST requests from the IP address 193.169.180.1 at any time. Use the current HTTPS version and standard port 443 for HTTPS connections.</p>
201The webhook was created successfully.
400<p>The webhook could not be created (either url, type or format was wrong).</p>
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/webhooks \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'type=open' \
--data 'format=json' \
--data 'targetUrl=string'