Skip to main content

Webhook custom headers

Log in to add to favourites

You can specify custom headers that Contensis will use while sending the payload to the specified webhook endpoint. Custom headers give the destination application an option to authenticate your webhook requests, and reject any that do not contain these custom headers.

Header types

Contensis supports two types of user-defined headers. Headers and secret headers. Both types use key-value parameters that are sent as part of the webhook request.

Header

A standard header contains a key-value pair that can been added to a webhook. The values of these key-value pairs are visible and updatable in the webhook editor.

Secret header

A secret header is ideal for adding sensitive key-values pairs like those used for adding client IDs and shared secrets. Once a secret header has been added to a webhook, the value of the secret header is not displayed in the interface and cannot be changed.

System headers

The following headers are generated by the webhook service and will be sent with all requests.

KeyValue
content-lengthNumeric value depending on the length of the payload.
content-typeapplication/json; charset=utf-8

Note: The content-type header can be overridden by adding a header with the key of content-type and the specifc content type you want to use. This is especially useful if you want to send an XML payload, so you could set the value as application/xml.

Setting a custom header

To set a header, locate the headers field in the webhook that you are editing.

  • Press the green Add button. A menu will be shown displaying the types of supported header.
  • Choose a header type that you want to set.
  • A window will be displayed where you can enter the key-value pair for the header.
  • Press Add header, for the header to be added to the list of headers.
  • Save your changes for the new header to be set as part of the webhook.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request