---
title: "Configuring Webhook Services"
canonical: "https://docs.infoblox.com/space/BloxOneCloud/35367627/Configuring%20Webhook%20Services"
format: markdown
---
<span style="color: #202124">A webhook integration allows</span><span style="color: #000000"> you to send Infoblox Platform notifications to a designated application by using a unique URL. When setting up a webhook service, you can choose to use the default webhook template or construct a custom template for a specific payload for your webhook notification. </span>

<span style="color: #000000">Note that all webhook alerts originate from this IP address: 3.221.42.234.</span>

> ⚠️ <span style="color: #000000">To ensure that notifications associated with an existing custom webhook service function properly when you modify the service configuration, you must first disable the notifications associated with the service. After you are done with the changes, you can enable the notifications again. For information, see the </span>*<span style="color: #000000">Modifying Custom Webhook Services</span>*<span style="color: #000000"> section in this topic.</span>

# Creating New Webhook Services

To set up a new webhook service, do the following:

1. <span style="color: #000000">Log in to Infoblox Portal.</span>
2. <span style="color: #000000">Click the notification icon on the top right corner of the Portal (next to the global search icon).</span>
3. <span style="color: #000000">In the </span>**<span style="color: #000000">Notifications</span>**<span style="color: #000000"> panel, click the ellipse icon > </span>**<span style="color: #000000">View All/Settings</span>**<span style="color: #000000">.</span>
4. <span style="color: #000000">Click the </span>**<span style="color: #000000">Service Integrations</span>**<span style="color: #000000"> tab.</span>
5. <span style="color: #000000">Click </span>**<span style="color: #000000">Add Service Integration</span>**<span style="color: #000000"> and specify the following:</span>

- **<span style="color: #000000">Type</span>**<span style="color: #000000">: From the drop-down menu, select </span>**<span style="color: #000000">Custom</span>**<span style="color: #000000"> to set up a webhook integration.</span>
- **<span style="color: #000000">Name</span>**<span style="color: #000000">: Enter the name of the webhook service. Infoblox Platform uses this name on the </span>**<span style="color: #000000">Notification Settings </span>**<span style="color: #000000">page, for configuration purposes. For more information, see </span>[*<span style="color: #000000">Configuring Notification Settings</span>*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35430340)<span style="color: #000000">.</span>
- **<span style="color: #000000">URL</span>**<span style="color: #000000">: Enter the URL of the application to which you want Infoblox Platform to send notifications. E</span><span style="color: #000000">mail notifications in a standardized JSON format </span><span style="color: #000000">are sent </span><span style="color: #000000">to this URL.</span>
- **<span style="color: #000000">Authentication</span>**<span style="color: #000000">: From the drop-down menu, choose the authentication method for this webhook integration:</span>
  - **<span style="color: #000000">None</span>**<span style="color: #000000">: No authentication is required for this integration.</span>
  - **<span style="color: #000000">Basic</span>**<span style="color: #000000">: Enter the username and password for basic authentication.</span>
  - **<span style="color: #000000">Token</span>**<span style="color: #000000">: Enter the access token to be used for authentication.  </span>
- **<span style="color: #000000">Template</span>**<span style="color: #000000">: A template determines the output of your webhook notification. You can create a custom webhook template in the editor provided here.  Infoblox Platform supports the Go template format: </span>a standard template used<span style="color: #000000"> to generate textual output. For information about Go templates, see </span>[*<span style="color: #000000">https://pkg.go.dev/text/template</span>*](https://pkg.go.dev/text/template)<span style="color: #000000">. If you do not provide a custom template, Infoblox Platform generates the payload according to the supported fields in the default template. For more information, see </span>[*<span style="color: #000000">Default Webhook Template and Supported Keys</span>*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35367611)<span style="color: #000000">.</span>
- **<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">: </span><span style="color: #000000">Note the following when creating a custom webhook template.</span>
- <span style="color: #000000">You can include actions in your template by specifying user-defined key-value pairs in </span>**<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">. W</span><span style="color: #000000">hen generating the payload, Infoblox Platform </span><span style="color: #000000">uses the keys and values you define. </span>
- <span style="color: #000000">If you compose a valid template but have not defined any key-value pairs in </span>**<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">, then Infoblox Platform obtains the values from the database, if the values exist. For the keys that do not have values, only the key names with empty values will appear in the payload.</span>
- <span style="color: #000000">If you compose a valid template but do not include certain keys you have defined in </span>**<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">, Infoblox Platform ignores those key-value pairs, so they will not appear in the payload.</span>
- <span style="color: #000000">If your custom template includes supported keys from the default template, and if you have defined key-value pairs for them in </span>**<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">, the user-defined values will override the default values, if applicable. </span>

<span style="color: #000000">The following is an example of a simple Go template: </span>

```
Customer: {{ .customer_name}} 
Application: {{ .application_name}} 
Message: {{ .message}}
```

You define values for `customer_name` and `application_name` in the **Webhook Context** field. Note that `Message` is an Infoblox-defined field. 

The following is an example of how to use the `actionable_redirect_action` and `actionable_redirect_label` keys:

```
{{if $url:=.actionable_redirect_action}}
ActionableRedirectUrl: {{$url}}
{{if $text:=.actionable_redirect_label}}
ActionableRedirectText: {{$text}}
{{else}}ActionableRedirectText: {{$url}}  {{end}}
{{end}}
```

For more information about the default template and supported keys, see [*Default Webhook Template and Supported Keys*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35367611).

<span style="color: #000000">You can also use the Infoblox API to create a custom template. For more information about using the notification APIs, see </span>**<span style="color: #000000">Infoblox Platform</span>**<span style="color: #000000"> > </span><span style="color: #000000">**Notifications config**</span><span style="color: #000000"> in </span>  
[*<span style="color: #000000">https://csp.infoblox.com/apidoc</span>*](https://csp.infoblox.com/apidoc)<span style="color: #000000">.</span>

- **<span style="color: #000000">Webhook Context</span>**<span style="color: #000000">: In the JSON editor, specify key-value pairs for the actions in your webhook template. You can also specify HTTP header overrides used to generate the webhook notification.</span>

Based on the template example above, you might define the following key-value pairs:


```
{

    "customer_name": “John Doe”,

    "application_name": "Universal DDI",

    "Authorization": ["Basic YWxhZGRpbjpvcGVuc2VzYW1l", "http-header:true"],

    "Content-type": ["application/xml", "http-header:true "]

	“actionable_redirect_action”: “https://actionable.redirect.url.com”,

	“actionable_redirect_label”: “actionable redirect link text”

}
```

Note that the `actionable_redirect_label` key is optional. If it is missing, the default value would be the value in `actionable_redirect_action`. In addition, if `actionable_redirect_action` is missing, neither `ActionableRedirectUrl` nor `ActionableRedirectText` will show up in the HTTP payload.

The webhook context must be in a valid, non-nested JSON format.

Based on the examples given in the **Template** and **Webhook Context** fields, Infoblox Platform generates the following:

 HTTP headers:

> Macro (panel)
> 
> `"Authorization": ["Basic YWxhZGRpbjpvcGVuc2VzYW1l"]    `
> 
> `"Content-type": ["application/xml"]`

HTTP payload:

> Macro (panel)
> 
> `Customer:  John Doe, `
> 
> `Application:  Universal DDI`
> 
> `Message:  Internal error occurred. For more details, see log for request 1a94821f-0f7a-48ab-b1cf-b137d628afd4`
> 
> `ActionableRedirectUrl: https://actionable.redirect.url.com`
> 
> `ActionableRedirectText: actionable redirect link text`

<span style="color: #000000">Click </span>**<span style="color: #000000">Validate</span>**<span style="color: #000000"> after you complete the template and webhook context. Infoblox Platform validates the JSON schema you have entered and sends an error if the template or webhook context is not in a valid JSON format. </span>

<span style="color: #000000">Click </span>**<span style="color: #000000">Save & Close</span>**<span style="color: #000000">.</span>

> ⚠️ **Note**
> ⚠️ 
> ⚠️ After you have added or configured new services, they will appear in the **Service Integrations** section of the **Notifications** page. Ensure that you select the new services if you want to send notifications to them. For information on how to configure notification settings, see [*Configuring Notification Settings*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35430340).

# <span style="color: #000000">Modifying Existing Webhook Services</span>

<span style="color: #000000">If you need to modify an existing webhook service, you must first disable all notifications associated with the service. You can then make changes to the webhook service before enabling notifications again.</span>

<span style="color: #000000">To modifying an existing webhook service, do the following:</span>

1. <span style="color: #000000">Log in to Infoblox Portal.</span>
2. <span style="color: #000000">Click the notification icon on the top right corner of the Portal (next to the global search icon)</span><span style="color: #000000">.</span>
3. <span style="color: #000000">n the </span>**<span style="color: #000000">Notifications</span>**<span style="color: #000000"> panel, click the ellipse icon > </span>**<span style="color: #000000">View All/Settings</span>**
4. <span style="color: #000000">Click </span>**<span style="color: #000000">Admin Settings </span>**<span style="color: #000000">on the upper right-hand corner of the page.</span>
5. <span style="color: #000000">In the </span>**<span style="color: #000000">Admin Settings</span>**<span style="color: #000000"> dialog, expand the </span>**<span style="color: #000000">Service Integrations</span>**<span style="color: #000000"> section.</span>
6. <span style="color: #000000">Deselect all the notification check boxes for the respective webhook service to which you plan to make changes.</span>
7. <span style="color: #000000">Click </span>**<span style="color: #000000">Save & Close</span>**<span style="color: #000000">.</span>
8. <span style="color: #000000">Go to the </span>**<span style="color: #000000">Notifications</span>**<span style="color: #000000"> > </span>**<span style="color: #000000">Service Integrations</span>**<span style="color: #000000"> tab.</span>
9. <span style="color: #000000">Click </span>**<span style="color: #000000">Edit</span>**<span style="color: #000000"> on the webhook service you want to modify.</span>
10. <span style="color: #000000">In the edit dialog, make the required changes, and then click </span>**<span style="color: #000000">Save & Close</span>**<span style="color: #000000">. See the </span>**<span style="color: #000000">Creating New Webhook Services</span>**<span style="color: #000000"> section for more information.</span>
11. <span style="color: #000000">Click </span>**<span style="color: #000000">Admin Settings </span>**<span style="color: #000000">on the upper right-hand corner of the page again.</span>
12. <span style="color: #000000">In the </span>**<span style="color: #000000">Admin Settings</span>**<span style="color: #000000"> dialog, expand the </span>**<span style="color: #000000">Service Integrations</span>**<span style="color: #000000"> section.</span>
13. <span style="color: #000000">Select the check boxes of the notifications that you want to enable for the modified webhook service.</span>
14. <span style="color: #000000">Click </span>**<span style="color: #000000">Save & Close</span>**<span style="color: #000000">.</span>