# Webhook

Endpoints for managing webhook subscriptions: list current subscriptions, register new endpoint URLs, remove existing ones, and send a test event to verify a subscription.

## List webhook subscriptions

> Lists all the URLs that are currently subscribed to receive events via webhooks.

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Webhook","version":"1.0.0"},"tags":[{"name":"Webhook","description":"Endpoints for managing webhook subscriptions: list current subscriptions, register new endpoint URLs, remove existing ones, and send a test event to verify a subscription.\n"}],"servers":[{"url":"https://app.referralsaasquatch.com/api/v1"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic","description":"Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions."}},"schemas":{"WebhookEndpoint":{"description":"An endpoint to receive events","properties":{"endpointUrl":{"type":"string","description":"The url of the endpoint that receives events."},"name":{"type":"string","description":"Optional name of the endpoint that receives events."},"source":{"type":"string","readOnly":true,"description":"How the subscription was created. Always `MANUAL` for subscriptions created via the API."},"webhookTypes":{"type":"array","description":"The event types this endpoint is subscribed to. `[\"*\"]` means all event types.","items":{"type":"string"}}}},"Error":{"properties":{"statusCode":{"description":"The HTTP status code of the error","type":"integer","format":"int32"},"message":{"description":"The human-readable description of what went wrong. Use this to help you debug.","type":"string"},"apiErrorCode":{"description":"A machine error code","type":"string"},"rsCode":{"description":"A secondary machine-readable error code.","type":"string","nullable":true}}}},"responses":{"GeneralError":{"description":"Unexpected Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/{tenant_alias}/subscription":{"get":{"summary":"List webhook subscriptions","description":"Lists all the URLs that are currently subscribed to receive events via webhooks.","operationId":"listWebhooks","tags":["Webhook"],"parameters":[{"name":"tenant_alias","in":"path","description":"Tenant being referenced. E.g. `\"aboih12h16t\"` or `\"test_abo912126tastastt\"`","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of endpoints","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}},"default":{"$ref":"#/components/responses/GeneralError"}}}}}}
```

## Create a webhook subscription

> Subscribes a URL to receive events via webhooks.

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Webhook","version":"1.0.0"},"tags":[{"name":"Webhook","description":"Endpoints for managing webhook subscriptions: list current subscriptions, register new endpoint URLs, remove existing ones, and send a test event to verify a subscription.\n"}],"servers":[{"url":"https://app.referralsaasquatch.com/api/v1"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic","description":"Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions."}},"schemas":{"WebhookEndpoint":{"description":"An endpoint to receive events","properties":{"endpointUrl":{"type":"string","description":"The url of the endpoint that receives events."},"name":{"type":"string","description":"Optional name of the endpoint that receives events."},"source":{"type":"string","readOnly":true,"description":"How the subscription was created. Always `MANUAL` for subscriptions created via the API."},"webhookTypes":{"type":"array","description":"The event types this endpoint is subscribed to. `[\"*\"]` means all event types.","items":{"type":"string"}}}},"Error":{"properties":{"statusCode":{"description":"The HTTP status code of the error","type":"integer","format":"int32"},"message":{"description":"The human-readable description of what went wrong. Use this to help you debug.","type":"string"},"apiErrorCode":{"description":"A machine error code","type":"string"},"rsCode":{"description":"A secondary machine-readable error code.","type":"string","nullable":true}}}},"responses":{"GeneralError":{"description":"Unexpected Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/{tenant_alias}/subscription":{"post":{"summary":"Create a webhook subscription","description":"Subscribes a URL to receive events via webhooks.","operationId":"createWebhook","tags":["Webhook"],"parameters":[{"name":"tenant_alias","in":"path","description":"Tenant being referenced. E.g. `\"aboih12h16t\"` or `\"test_abo912126tastastt\"`","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Details of the endpoint to be created","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"responses":{"201":{"description":"Webhook endpoint created"},"default":{"$ref":"#/components/responses/GeneralError"}}}}}}
```

## Delete a webhook subscription

> Removes a URL from receiving events via webhooks.

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Webhook","version":"1.0.0"},"tags":[{"name":"Webhook","description":"Endpoints for managing webhook subscriptions: list current subscriptions, register new endpoint URLs, remove existing ones, and send a test event to verify a subscription.\n"}],"servers":[{"url":"https://app.referralsaasquatch.com/api/v1"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic","description":"Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions."}},"responses":{"GeneralError":{"description":"Unexpected Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"properties":{"statusCode":{"description":"The HTTP status code of the error","type":"integer","format":"int32"},"message":{"description":"The human-readable description of what went wrong. Use this to help you debug.","type":"string"},"apiErrorCode":{"description":"A machine error code","type":"string"},"rsCode":{"description":"A secondary machine-readable error code.","type":"string","nullable":true}}}}},"paths":{"/{tenant_alias}/subscription/{url}":{"delete":{"summary":"Delete a webhook subscription","description":"Removes a URL from receiving events via webhooks.","operationId":"deleteWebhook","tags":["Webhook"],"parameters":[{"name":"tenant_alias","in":"path","description":"Tenant being referenced. E.g. `\"aboih12h16t\"` or `\"test_abo912126tastastt\"`","required":true,"schema":{"type":"string"}},{"name":"url","in":"path","description":"The url of the endpoint that will be removed. URL-encode this field.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Endpoint deleted"},"default":{"$ref":"#/components/responses/GeneralError"}}}}}}
```

## Test a webhook subscription

> Sends a test event to the specified webhook.

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Webhook","version":"1.0.0"},"tags":[{"name":"Webhook","description":"Endpoints for managing webhook subscriptions: list current subscriptions, register new endpoint URLs, remove existing ones, and send a test event to verify a subscription.\n"}],"servers":[{"url":"https://app.referralsaasquatch.com/api/v1"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic","description":"Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions."}},"responses":{"GeneralError":{"description":"Unexpected Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"properties":{"statusCode":{"description":"The HTTP status code of the error","type":"integer","format":"int32"},"message":{"description":"The human-readable description of what went wrong. Use this to help you debug.","type":"string"},"apiErrorCode":{"description":"A machine error code","type":"string"},"rsCode":{"description":"A secondary machine-readable error code.","type":"string","nullable":true}}}}},"paths":{"/{tenant_alias}/subscription/{url}/test":{"post":{"summary":"Test a webhook subscription","description":"Sends a test event to the specified webhook.","operationId":"testWebhook","tags":["Webhook"],"parameters":[{"name":"tenant_alias","in":"path","description":"Tenant being referenced. E.g. `\"aboih12h16t\"` or `\"test_abo912126tastastt\"`","required":true,"schema":{"type":"string"}},{"name":"url","in":"path","description":"The url of the endpoint to send a test message to. URL-encode this field.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Test message sent"},"default":{"$ref":"#/components/responses/GeneralError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/brand-api-reference/advocate-api-reference-v1/reference/webhook-overview/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
