> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/web-hooks-for-device.md).

# Web Hooks For Device

## GET /V2/{tenantVarCode}/devices/{deviceId}/webhooks

> Returns Configured Web Hooks for a device

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Web Hooks For Device"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/webhooks":{"get":{"tags":["Web Hooks For Device"],"summary":"Returns Configured Web Hooks for a device","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/xml":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/plain":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/xml":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}}}}}}}},"components":{"schemas":{"DeviceWebHooksConfigModel":{"type":"object","properties":{"Urls":{"type":"array","items":{"$ref":"#/components/schemas/DeviceWebHooksUrl"},"nullable":true},"Authentication":{"type":"string","nullable":true},"Username":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true}},"additionalProperties":false},"DeviceWebHooksUrl":{"type":"object","properties":{"Url":{"type":"string","nullable":true},"EventNotification":{"type":"boolean"},"MoMessage":{"type":"boolean"},"MtMessage":{"type":"boolean"}},"additionalProperties":false}}}}
```

## PUT /V2/{tenantVarCode}/devices/{deviceId}/webhooks

> Sets or Updates WebHooks configured for a device

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Web Hooks For Device"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/webhooks":{"put":{"tags":["Web Hooks For Device"],"summary":"Sets or Updates WebHooks configured for a device","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/xml":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/plain":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"text/xml":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/DeviceWebHooksConfigModel"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"DeviceWebHooksConfigModel":{"type":"object","properties":{"Urls":{"type":"array","items":{"$ref":"#/components/schemas/DeviceWebHooksUrl"},"nullable":true},"Authentication":{"type":"string","nullable":true},"Username":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true}},"additionalProperties":false},"DeviceWebHooksUrl":{"type":"object","properties":{"Url":{"type":"string","nullable":true},"EventNotification":{"type":"boolean"},"MoMessage":{"type":"boolean"},"MtMessage":{"type":"boolean"}},"additionalProperties":false}}}}
```

## DELETE /V2/{tenantVarCode}/devices/{deviceId}/webhooks

> Deletes all WebHooks configured for a device

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Web Hooks For Device"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/webhooks":{"delete":{"tags":["Web Hooks For Device"],"summary":"Deletes all WebHooks configured for a device","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```
