> For the complete documentation index, see [llms.txt](https://docs.onomondo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onomondo.com/readme/webhooks.md).

# Webhooks

## Retrieve information about all Webhooks

> Returns detailed information for all registered Webhooks.\
> {% hint style="info" %} Minimum package requirement: \<strong>Pro\</strong> {% endhint %}

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/webhooks":{"get":{"summary":"Retrieve information about all Webhooks","description":"Returns detailed information for all registered Webhooks.\n{% hint style=\"info\" %} Minimum package requirement: <strong>Pro</strong> {% endhint %}","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Retrieve information about a specific Webhook

> Returns detailed information for a specific Webhook.\
> {% hint style="info" %} Minimum package requirement: \<strong>Pro\</strong> {% endhint %}

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/webhooks/{webhook_id}":{"get":{"summary":"Retrieve information about a specific Webhook","description":"Returns detailed information for a specific Webhook.\n{% hint style=\"info\" %} Minimum package requirement: <strong>Pro</strong> {% endhint %}","parameters":[{"name":"webhook_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Add Webhook

> Create a Webhook to receive events from your organization. Webhooks can be filtered as to what they receive by applying filtering using Tags and/or excluding event types.\
> {% hint style="info" %} Minimum package requirement: \<strong>Pro\</strong> {% endhint %}

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/webhooks":{"post":{"summary":"Add Webhook","description":"Create a Webhook to receive events from your organization. Webhooks can be filtered as to what they receive by applying filtering using Tags and/or excluding event types.\n{% hint style=\"info\" %} Minimum package requirement: <strong>Pro</strong> {% endhint %}","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","active","label","tags","exclude_types"],"properties":{"url":{"type":"string","format":"uri","pattern":"^https://","description":"The HTTPS endpoint that will receive the events."},"active":{"type":"boolean","description":"When true, the endpoint will start receiving events."},"label":{"type":"string","nullable":true,"description":"Plain text name for the webhook. Must be unique if provided."},"tags":{"type":"array","items":{"type":"string"},"description":"Array of Tag IDs to filter events. Only SIMs with these Tags will trigger events. Empty array includes all Tags."},"exclude_types":{"type":"array","items":{"type":"string","enum":["usage","usage-sms","network-registration","network-deregistration","network-authentication","sms","location","cost-alert"]},"description":"Array of event types to exclude from this webhook. Empty array will send all event types."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Update Webhook

> Modify a specific Webhook.\
> {% hint style="info" %} Minimum package requirement: \<strong>Pro\</strong> {% endhint %}\
> {% hint style="warning" %} When updating arrays, the whole array will be replaced. To keep existing \<code>Tags\</code> or \<code>exclude\_types\</code> you will need to include all properties in the array, not just the additional ones. {% endhint %}

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/webhooks/{webhook_id}":{"patch":{"summary":"Update Webhook","description":"Modify a specific Webhook.\n{% hint style=\"info\" %} Minimum package requirement: <strong>Pro</strong> {% endhint %}\n{% hint style=\"warning\" %} When updating arrays, the whole array will be replaced. To keep existing <code>Tags</code> or <code>exclude_types</code> you will need to include all properties in the array, not just the additional ones. {% endhint %}","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","active","label","tags","exclude_types"],"properties":{"url":{"type":"string","format":"uri","pattern":"^https://","description":"The HTTPS endpoint that will receive the events."},"active":{"type":"boolean","description":"When true, the endpoint will start receiving events."},"label":{"type":"string","nullable":true,"description":"Plain text name for the webhook. Must be unique if provided."},"tags":{"type":"array","items":{"type":"string"},"description":"Array of Tag IDs to filter events. Only SIMs with these Tags will trigger events. Empty array includes all Tags."},"exclude_types":{"type":"array","items":{"type":"string","enum":["usage","usage-sms","network-registration","network-deregistration","network-authentication","sms","location","cost-alert"]},"description":"Array of event types to exclude from this webhook. Empty array will send all event types."}}}}}},"parameters":[{"name":"webhook_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Remove Webhook

> Removes a specific Webhook. If you think you will want to use it again you can always set the \`"active": false\` with the PATCH call instead. This will keep the Webhook but prevent it from sending any events to the endpoint.\
> {% hint style="info" %} Minimum package requirement: \<strong>Pro\</strong> {% endhint %}

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/webhooks/{webhook_id}":{"delete":{"summary":"Remove Webhook","description":"Removes a specific Webhook. If you think you will want to use it again you can always set the `\"active\": false` with the PATCH call instead. This will keep the Webhook but prevent it from sending any events to the endpoint.\n{% hint style=\"info\" %} Minimum package requirement: <strong>Pro</strong> {% endhint %}","parameters":[{"name":"webhook_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```
